Explorar o código

fixed infinite loop in JS.

Nicolas Cannasse %!s(int64=19) %!d(string=hai) anos
pai
achega
f31310e5be
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      std/haxe/Unserializer.hx

+ 2 - 0
std/haxe/Unserializer.hx

@@ -43,6 +43,8 @@ class Unserializer {
  		var s = false;
  		while( true ) {
  			var c = buf.charCodeAt(pos) - 48;
+ 			if( Std.isNaN(c) )
+ 				break;
  			if( c == -3 ) {
  				s = true;
  				pos++;