Created
November 23, 2014 02:11
-
-
Save kalineh/8ace180a98ef9de843a7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const int bufferSize = 256; | |
const int numParams = a_thread->GetNumParams(); | |
int len = 0; | |
int size = 0; | |
int ret = -1; | |
char* str = NULL; | |
char buffer[bufferSize] = { 0 }; | |
gmMachine* machine = a_thread->GetMachine(); | |
for (int i = 0; i < numParams; ++i) | |
{ | |
gmVariable param = a_thread->Param(i); | |
const char* param_str = param.AsString(machine, buffer, bufferSize); | |
gmConcat(machine, str, len, size, param_str, 64); | |
if (str) | |
{ | |
GM_ASSERT(len < size); | |
str[len++] = ' '; | |
str[len] = '\0'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment