This commit is contained in:
mathias 2005-01-11 12:39:01 +00:00
parent 5bbab52d6d
commit 2a49732159
2 changed files with 5 additions and 5 deletions

View file

@ -113,7 +113,7 @@ void TextureRender::allocateColorTables() {
if (red == 0) { if (red == 0) {
char sbuf[128]; char sbuf[128];
sprintf(sbuf, "%d", size); sprintf(sbuf, "%ld", (long int) size);
throw std::string("TextureRender::TextureRender(): " + throw std::string("TextureRender::TextureRender(): " +
std::string(_FBTKTEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf)); std::string(_FBTKTEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf));
} }
@ -122,7 +122,7 @@ void TextureRender::allocateColorTables() {
green = FB_new_nothrow unsigned char[size]; green = FB_new_nothrow unsigned char[size];
if (green == 0) { if (green == 0) {
char sbuf[128]; char sbuf[128];
sprintf(sbuf, "%d", size); sprintf(sbuf, "%ld", (long int) size);
throw std::string("TextureRender::TextureRender(): " + throw std::string("TextureRender::TextureRender(): " +
std::string(_FBTKTEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf)); std::string(_FBTKTEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf));
} }
@ -130,7 +130,7 @@ void TextureRender::allocateColorTables() {
blue = FB_new_nothrow unsigned char[size]; blue = FB_new_nothrow unsigned char[size];
if (blue == 0) { if (blue == 0) {
char sbuf[128]; char sbuf[128];
sprintf(sbuf, "%d", size); sprintf(sbuf, "%ld", (long int) size);
throw std::string("TextureRender::TextureRender(): " + throw std::string("TextureRender::TextureRender(): " +
std::string(_FBTKTEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf)); std::string(_FBTKTEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf));
} }

View file

@ -77,7 +77,7 @@ setFromString(const char *strval) {
template<> template<>
void FbTk::Resource<long long>:: void FbTk::Resource<long long>::
setFromString(const char *strval) { setFromString(const char *strval) {
if (sscanf(strval, "%ul", &m_value) != 1) if (sscanf(strval, "%llu", &m_value) != 1)
setDefaultValue(); setDefaultValue();
} }
@ -159,7 +159,7 @@ template<>
string FbTk::Resource<long long>:: string FbTk::Resource<long long>::
getString() { getString() {
char tmpstr[128]; char tmpstr[128];
sprintf(tmpstr, "%ul", m_value); sprintf(tmpstr, "%llu", (unsigned long long) m_value);
return string(tmpstr); return string(tmpstr);
} }