Nicolas Cannasse 19 years ago
parent
commit
10e36b5c54
1 changed files with 2 additions and 1 deletions
  1. 2 1
      std/haxe/Unserializer.hx

+ 2 - 1
std/haxe/Unserializer.hx

@@ -41,12 +41,13 @@ class Unserializer {
  	function readDigits() {
  	function readDigits() {
  		var k = 0;
  		var k = 0;
  		var s = false;
  		var s = false;
+ 		var fpos = pos;
  		while( true ) {
  		while( true ) {
  			var c = buf.charCodeAt(pos);
  			var c = buf.charCodeAt(pos);
  			if( c == null )
  			if( c == null )
  				break;
  				break;
  			if( c == 45 ) { // negative sign
  			if( c == 45 ) { // negative sign
- 				if( pos != 0 )
+ 				if( pos != fpos )
  					break;
  					break;
  				s = true;
  				s = true;
  				pos++;
  				pos++;