Explorar el Código

allow leading + in custom utoi function

https://github.com/HaxeFoundation/haxe/pull/10546#issuecomment-1016319563
Simon Krajewski hace 3 años
padre
commit
0666e78947
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  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;
 	}