2
0
Эх сурвалжийг харах

Fixed off-by-one position of look-ahead character

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@7520 8c9fc860-2736-0410-a75d-ab315db34111
negelef 7 жил өмнө
parent
commit
36fed9ec18

+ 2 - 1
source/FoxAMD64Assembler.Mod

@@ -1918,10 +1918,10 @@ TYPE
 
 			PROCEDURE Reset;
 			BEGIN
-				position := orgPos;
 				reader.SetPos(orgReaderPos);
 				emitter.code.SetPC(orgCodePos);
 				NextChar;
+				position := orgPos;
 			END Reset;
 
 			PROCEDURE FindLabels;
@@ -1988,6 +1988,7 @@ TYPE
 			orgReaderPos := reader.Pos();
 			orgCodePos := emitter.code.pc;
 			NextChar;
+			position := orgPos;
 
 			(* first we have to find all labels as their names might collide with symbol names *)
 			FindLabels;