Fossil SCM
Fix fossil test-th-eval 'expr 0+0x0bc': TH_ERROR: expected number, got: "0x0bc"
Commit
b153caf67ee006bab7fb77480bd6c9cea88c7982
Parent
b34fda9692ad587…
1 file changed
+2
-4
M
src/th.c
+2
-4
| --- src/th.c | ||
| +++ src/th.c | ||
| @@ -2639,17 +2639,15 @@ | ||
| 2639 | 2639 | if( z[i]=='0' ){ |
| 2640 | 2640 | if( z[i+1]=='x' || z[i+1]=='X' ){ |
| 2641 | 2641 | i += 2; |
| 2642 | 2642 | base = 16; |
| 2643 | 2643 | isdigit = th_ishexdig; |
| 2644 | - } | |
| 2645 | - if( z[i+1]=='o' || z[i+1]=='O' ){ | |
| 2644 | + }else if( z[i+1]=='o' || z[i+1]=='O' ){ | |
| 2646 | 2645 | i += 2; |
| 2647 | 2646 | base = 8; |
| 2648 | 2647 | isdigit = th_isoctdig; |
| 2649 | - } | |
| 2650 | - if( z[i+1]=='b' || z[i+1]=='B' ){ | |
| 2648 | + }else if( z[i+1]=='b' || z[i+1]=='B' ){ | |
| 2651 | 2649 | i += 2; |
| 2652 | 2650 | base = 2; |
| 2653 | 2651 | isdigit = th_isbindig; |
| 2654 | 2652 | } |
| 2655 | 2653 | } |
| 2656 | 2654 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -2639,17 +2639,15 @@ | |
| 2639 | if( z[i]=='0' ){ |
| 2640 | if( z[i+1]=='x' || z[i+1]=='X' ){ |
| 2641 | i += 2; |
| 2642 | base = 16; |
| 2643 | isdigit = th_ishexdig; |
| 2644 | } |
| 2645 | if( z[i+1]=='o' || z[i+1]=='O' ){ |
| 2646 | i += 2; |
| 2647 | base = 8; |
| 2648 | isdigit = th_isoctdig; |
| 2649 | } |
| 2650 | if( z[i+1]=='b' || z[i+1]=='B' ){ |
| 2651 | i += 2; |
| 2652 | base = 2; |
| 2653 | isdigit = th_isbindig; |
| 2654 | } |
| 2655 | } |
| 2656 |
| --- src/th.c | |
| +++ src/th.c | |
| @@ -2639,17 +2639,15 @@ | |
| 2639 | if( z[i]=='0' ){ |
| 2640 | if( z[i+1]=='x' || z[i+1]=='X' ){ |
| 2641 | i += 2; |
| 2642 | base = 16; |
| 2643 | isdigit = th_ishexdig; |
| 2644 | }else if( z[i+1]=='o' || z[i+1]=='O' ){ |
| 2645 | i += 2; |
| 2646 | base = 8; |
| 2647 | isdigit = th_isoctdig; |
| 2648 | }else if( z[i+1]=='b' || z[i+1]=='B' ){ |
| 2649 | i += 2; |
| 2650 | base = 2; |
| 2651 | isdigit = th_isbindig; |
| 2652 | } |
| 2653 | } |
| 2654 |