From d767e7425823453a976a6349b983efa05e5e1733 Mon Sep 17 00:00:00 2001 From: gstellenberg Date: Sun, 27 Sep 2009 01:05:57 -0500 Subject: [PATCH] Fix error in Stern switch mappings. --- src/pinproc.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pinproc.cpp b/src/pinproc.cpp index a03d7b6..7a594cf 100644 --- a/src/pinproc.cpp +++ b/src/pinproc.cpp @@ -235,7 +235,6 @@ PR_EXPORT void PRDriverStatePatter(PRDriverState *driver, uint16_t millisecondsO PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str) { uint16_t x; - printf("hello\n"); if (str == NULL) return 0; @@ -281,7 +280,6 @@ PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str) } else if (machineType == kPRMachineStern) { - printf("hi\n"); switch (str[0]) { case 'L': @@ -302,7 +300,7 @@ PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str) else return x + 7; default: if ((x - 1) % 16 < 8) - return 32 + 8 * (x / 8) + (7 - ((x - 1) % 8)); + return 32 + 8 * ((x - 1) / 8) + (7 - ((x - 1) % 8)); else return 32 + (x - 1); }