Fossil SCM

Fix fossil test-th-eval 'expr 0+0x0bc': TH_ERROR: expected number, got: "0x0bc"

jan.nijtmans 2014-04-07 19:08 trunk
Commit b153caf67ee006bab7fb77480bd6c9cea88c7982
1 file changed +2 -4
+2 -4
--- src/th.c
+++ src/th.c
@@ -2639,17 +2639,15 @@
26392639
if( z[i]=='0' ){
26402640
if( z[i+1]=='x' || z[i+1]=='X' ){
26412641
i += 2;
26422642
base = 16;
26432643
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' ){
26462645
i += 2;
26472646
base = 8;
26482647
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' ){
26512649
i += 2;
26522650
base = 2;
26532651
isdigit = th_isbindig;
26542652
}
26552653
}
26562654
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button