Jelajahi Sumber

allow leading + in custom utoi function

https://github.com/HaxeFoundation/haxe/pull/10546#issuecomment-1016319563
Simon Krajewski 3 tahun lalu
induk
melakukan
0666e78947
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      src/std/ucs2.c

+ 1 - 1
src/std/ucs2.c

@@ -109,7 +109,7 @@ int utoi( const uchar *str, uchar **end ) {
 	while( is_space_char(*str) ) str++;
 	while( i < 16 ) {
 		int c = *str++;
-		if( (c < '0' || c > '9') && c != '-' )
+		if( (c < '0' || c > '9') && c != '-' && c != '+')
 			break;
 		buf[i++] = (char)c;
 	}