mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-21 04:39:45 +00:00
Various string/printf fixes.
This commit is contained in:
@ -428,7 +428,7 @@ static bool showBounds = false;
|
||||
float y = sH * fControls[ i ]->fBoundsPoints[ j ].fY;
|
||||
plDebugText::Instance().DrawRect( (UInt16)(x - 2), (UInt16)(y - 2), (UInt16)(x + 2), (UInt16)(y + 2), color );
|
||||
char str[ 16 ];
|
||||
itoa( j, str, 10 );
|
||||
snprintf(str, 16, "%d", j);
|
||||
plDebugText::Instance().DrawString( (UInt16)(x + 8), (UInt16)(y - 8), str, color );
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
||||
// //
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#include <wchar.h>
|
||||
|
||||
#include "pfJournalBook.h"
|
||||
#include "hsUtils.h"
|
||||
#include "hsStlUtils.h"
|
||||
|
@ -274,7 +274,7 @@ PyObject *EnumValue_oct(EnumValue *v)
|
||||
if (x == 0)
|
||||
strcpy(buf, "0");
|
||||
else
|
||||
_snprintf(buf, sizeof(buf), "0%lo", x);
|
||||
snprintf(buf, sizeof(buf), "0%lo", x);
|
||||
return PyString_FromString(buf);
|
||||
}
|
||||
|
||||
@ -287,7 +287,7 @@ PyObject *EnumValue_hex(EnumValue *v)
|
||||
Py_INCREF(Py_NotImplemented);
|
||||
return Py_NotImplemented;
|
||||
}
|
||||
_snprintf(buf, sizeof(buf), "0x%lx", x);
|
||||
snprintf(buf, sizeof(buf), "0x%lx", x);
|
||||
return PyString_FromString(buf);
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ class pfColorListElement : public pfGUIListText
|
||||
{
|
||||
size_t length = wcslen( fString1 ) + wcslen( fString2 ) + 3;
|
||||
thestring = TRACKED_NEW wchar_t[ length ];
|
||||
swprintf( thestring, length, L"%s %s", fString1, fString2 );
|
||||
snwprintf( thestring, length, L"%s %s", fString1, fString2 );
|
||||
wemade_string = true;
|
||||
}
|
||||
else if (fString1)
|
||||
|
Reference in New Issue
Block a user