case AOP_PAIRPTR:
setupPair (aop->aopu.aop_pairId, aop, offset);
if (aop->aopu.aop_pairId==PAIR_IX)
- SNPRINTF (buffer, sizeof(buffer),
- "!*ixx", 0);
+ tsprintf (buffer, sizeof(buffer), "!*ixx", offset);
else if (aop->aopu.aop_pairId==PAIR_IY)
- SNPRINTF (buffer, sizeof(buffer),
- "!*iyx", 0);
+ tsprintf (buffer, sizeof(buffer), "!*iyx", offset);
else
SNPRINTF (buffer, sizeof(buffer),
"(%s)", _pairs[aop->aopu.aop_pairId].name);
--- /dev/null
+/*
+ bug 2051348.
+*/
+
+#include <testfwk.h>
+
+#pragma disable_warning 85
+
+typedef char BOOLEAN;\r
+typedef signed char SHORTINT;
+\r
+void App_PutSprite (SHORTINT x, SHORTINT y, SHORTINT spr)
+{
+}\r
+\r
+static SHORTINT Labirint_objCell, Labirint_manX, Labirint_manY, Labirint_manDirX, Labirint_manDirY;\r
+static BOOLEAN Labirint_manPresent;\r
+\r
+static SHORTINT Labirint_GetManSprite (void)
+{
+ return(0);
+}
+\r
+static BOOLEAN Labirint_ManCanGo (void)
+{
+ return(0);
+}
+\r
+static BOOLEAN Labirint_ManGoing (SHORTINT x, SHORTINT y)
+{
+ return(0);
+}
+\r
+static void Labirint_SetCell (SHORTINT x, SHORTINT y, SHORTINT cell)
+{
+}\r
+\r
+static void Labirint_TryMoveMan (void)\r
+{\r
+ SHORTINT x, y, manSprite;\r
+ if (Labirint_ManCanGo()) {\r
+ x = (Labirint_manX + Labirint_manDirX) + Labirint_manDirX;\r
+ y = (Labirint_manY + Labirint_manDirY) + Labirint_manDirY;\r
+ Labirint_manPresent = Labirint_ManGoing(x, y);\r
+ if (!Labirint_manPresent) {\r
+ return;\r
+ }\r
+ manSprite = Labirint_GetManSprite();\r
+ Labirint_SetCell(x, y, manSprite);\r
+ App_PutSprite(Labirint_manX, Labirint_manY, 0);
+ // Assembly fails for the next two lines.\r
+ Labirint_manX = Labirint_manX + Labirint_manDirX;\r
+ Labirint_manY = Labirint_manY + Labirint_manDirY;\r
+ } else {\r
+ manSprite = 4;\r
+ }\r
+ App_PutSprite(Labirint_manX, Labirint_manY, manSprite);\r
+}
+
+void
+testBug2051348(void)
+{
+ ASSERT(1);
+}
+