File tree 2 files changed +7
-3
lines changed
2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -303,10 +303,9 @@ bad_hex: Trap0(RE_INVALID_CHARS);
303
303
if (!dig ) return 0 ;
304
304
if (* cp == 'E' || * cp == 'e' ) {
305
305
* ep ++ = * cp ++ ;
306
- dig = 0 ;
306
+ dig = 1 ;
307
307
if (* cp == '-' || * cp == '+' ) * ep ++ = * cp ++ ;
308
- while (IS_LEX_NUMBER (* cp )) * ep ++ = * cp ++ , dig = 1 ;
309
- if (!dig ) return 0 ;
308
+ while (IS_LEX_NUMBER (* cp )) * ep ++ = * cp ++ ;
310
309
}
311
310
if (* cp == '%' ) {
312
311
if (dec_only ) return 0 ;
Original file line number Diff line number Diff line change @@ -110,6 +110,11 @@ Rebol [
110
110
--assert 0.0 = make 0.0 false
111
111
--assert error? try [to decimal! true]
112
112
--assert error? try [to decimal! false]
113
+ --test-- "make decimal from string"
114
+ ;@@ https://github.com/Oldes/Rebol-issues/issues/956
115
+ ch: copy ""
116
+ repeat x 255 [unless error? try [to-decimal join "1" to-char x] [append ch to-char x]]
117
+ --assert ch = "^- ',.0123456789Ee"
113
118
114
119
===end-group===
115
120
You can’t perform that action at this time.
0 commit comments