Skip to content

Instantly share code, notes, and snippets.

@kalineh
Created November 23, 2014 02:10
Show Gist options
  • Save kalineh/303fac14adce2fe4de4f to your computer and use it in GitHub Desktop.
Save kalineh/303fac14adce2fe4de4f to your computer and use it in GitHub Desktop.
const int bufferSize = 256;
int len = 0, size = 0, i, ret = -1;
char * str = NULL, buffer[bufferSize];
// build the string
for(i = 0; i < a_thread->GetNumParams(); ++i)
{
gmConcat(a_thread->GetMachine(), str, len, size, a_thread->Param(i).AsString(a_thread->GetMachine(), buffer, bufferSize), 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