Index: obcc/obcg.pas
===================================================================
--- obcc/obcg.pas	(Revision 61)
+++ obcc/obcg.pas	(Revision 62)
@@ -856,7 +856,8 @@
 		offs := ramstart mod $10000;
 		IF y.mode = g_Const THEN BEGIN 
 		  IF (y.a <= 0) OR (y.a > x.i_type^.len) THEN  Mark('invalid index');
-		  offs := offs + x.a - x.i_type^.size + (y.a - 1) * x.i_type^.base^.size;      
+		  offs := offs + x.a - x.i_type^.size + (y.a - 1) * x.i_type^.base^.size;  
+		  x.a := 1;
 		END
 		ELSE BEGIN 
 		  offs := offs + (x.a - 2) - x.i_type^.size;
