From 09fa93f68a9d881d6d396e546b49f4b281a465e4 Mon Sep 17 00:00:00 2001 From: "Gergely POLONKAI (W00d5t0ck)" Date: Sat, 21 Sep 2013 23:07:28 +0200 Subject: [PATCH] Added patch for 64bit compatibility --- formatter.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/formatter.cpp b/formatter.cpp index 8d76c12..1563d8f 100644 --- a/formatter.cpp +++ b/formatter.cpp @@ -58,7 +58,7 @@ Formatter::Formatter(unsigned char *data, int offset) if ((c.type == INT_ARG) || (c.type == STRING_ARG) || (c.type == FLOAT_ARG) || (c.type == DOUBLE_ARG)) { - int no = (int)c.data; + long int no = (long int)c.data; args[no - 1] = c.type; } } @@ -123,7 +123,7 @@ class StrArgValue: public ArgValue std::wstring Formatter::format(std::vector &argValues) const { std::wstring s; - int no; + long int no; for (int i = 0; i < commandsCnt; i++) { Command *cmd = &commands[i]; @@ -135,8 +135,8 @@ std::wstring Formatter::format(std::vector &argValues) const case STRING_ARG: case INT_ARG: - no = (int)cmd->data - 1; - if (no < (int)argValues.size()) + no = (long int)cmd->data - 1; + if (no < (long int)argValues.size()) s += argValues[no]->format(cmd); break;