aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/FbTk/TextureRender.cc6
-rw-r--r--src/Resources.cc4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/FbTk/TextureRender.cc b/src/FbTk/TextureRender.cc
index 5e7520b..0adb8e1 100644
--- a/src/FbTk/TextureRender.cc
+++ b/src/FbTk/TextureRender.cc
@@ -113,7 +113,7 @@ void TextureRender::allocateColorTables() {
113 113
114 if (red == 0) { 114 if (red == 0) {
115 char sbuf[128]; 115 char sbuf[128];
116 sprintf(sbuf, "%d", size); 116 sprintf(sbuf, "%ld", (long int) size);
117 throw std::string("TextureRender::TextureRender(): " + 117 throw std::string("TextureRender::TextureRender(): " +
118 std::string(_FBTKTEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf)); 118 std::string(_FBTKTEXT(Error, OutOfMemoryRed, "Out of memory while allocating red buffer.", "")) + string(sbuf));
119 } 119 }
@@ -122,7 +122,7 @@ void TextureRender::allocateColorTables() {
122 green = FB_new_nothrow unsigned char[size]; 122 green = FB_new_nothrow unsigned char[size];
123 if (green == 0) { 123 if (green == 0) {
124 char sbuf[128]; 124 char sbuf[128];
125 sprintf(sbuf, "%d", size); 125 sprintf(sbuf, "%ld", (long int) size);
126 throw std::string("TextureRender::TextureRender(): " + 126 throw std::string("TextureRender::TextureRender(): " +
127 std::string(_FBTKTEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf)); 127 std::string(_FBTKTEXT(Error, OutOfMemoryGreen, "Out of memory while allocating green buffer.", ""))+ string(sbuf));
128 } 128 }
@@ -130,7 +130,7 @@ void TextureRender::allocateColorTables() {
130 blue = FB_new_nothrow unsigned char[size]; 130 blue = FB_new_nothrow unsigned char[size];
131 if (blue == 0) { 131 if (blue == 0) {
132 char sbuf[128]; 132 char sbuf[128];
133 sprintf(sbuf, "%d", size); 133 sprintf(sbuf, "%ld", (long int) size);
134 throw std::string("TextureRender::TextureRender(): " + 134 throw std::string("TextureRender::TextureRender(): " +
135 std::string(_FBTKTEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf)); 135 std::string(_FBTKTEXT(Error, OutOfMemoryBlue, "Out of memory while allocating blue buffer.", ""))+ string(sbuf));
136 } 136 }
diff --git a/src/Resources.cc b/src/Resources.cc
index 9fd1dd6..7c7713f 100644
--- a/src/Resources.cc
+++ b/src/Resources.cc
@@ -77,7 +77,7 @@ setFromString(const char *strval) {
77template<> 77template<>
78void FbTk::Resource<long long>:: 78void FbTk::Resource<long long>::
79setFromString(const char *strval) { 79setFromString(const char *strval) {
80 if (sscanf(strval, "%ul", &m_value) != 1) 80 if (sscanf(strval, "%llu", &m_value) != 1)
81 setDefaultValue(); 81 setDefaultValue();
82} 82}
83 83
@@ -159,7 +159,7 @@ template<>
159string FbTk::Resource<long long>:: 159string FbTk::Resource<long long>::
160getString() { 160getString() {
161 char tmpstr[128]; 161 char tmpstr[128];
162 sprintf(tmpstr, "%ul", m_value); 162 sprintf(tmpstr, "%llu", (unsigned long long) m_value);
163 return string(tmpstr); 163 return string(tmpstr);
164} 164}
165 165