소스 검색

fixed infinite loop in JS.

Nicolas Cannasse 19 년 전
부모
커밋
f31310e5be
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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++;