diff --git a/src/alstream.cpp b/src/alstream.cpp index 7f225b9..18799ff 100644 --- a/src/alstream.cpp +++ b/src/alstream.cpp @@ -236,7 +236,6 @@ void ALStream::openSource(const std::string &filename) char buf[512]; snprintf(buf, sizeof(buf), "Unable to decode audio stream: %s.%s: %s", filename.c_str(), ext, e.msg.c_str()); - buf[sizeof(buf)-1] = '\0'; Debug() << buf; } diff --git a/src/filesystem.cpp b/src/filesystem.cpp index 624ffc0..6642d3b 100644 --- a/src/filesystem.cpp +++ b/src/filesystem.cpp @@ -611,7 +611,6 @@ static void fontSetEnumCB(void *data, const char *, char filename[512]; snprintf(filename, sizeof(filename), "Fonts/%s", fname); - filename[sizeof(filename)-1] = '\0'; PHYSFS_File *handle = PHYSFS_openRead(filename); diff --git a/src/settingsmenu.cpp b/src/settingsmenu.cpp index dbf6cc6..a14b488 100644 --- a/src/settingsmenu.cpp +++ b/src/settingsmenu.cpp @@ -533,7 +533,6 @@ struct SettingsMenuPrivate { char buf[64]; snprintf(buf, sizeof(buf), "Press key or joystick button for \"%s\"", captureName); - buf[sizeof(buf)-1] = '\0'; drawOff = Vec2i(); diff --git a/src/soundemitter.cpp b/src/soundemitter.cpp index 59a1b9b..3850c0b 100644 --- a/src/soundemitter.cpp +++ b/src/soundemitter.cpp @@ -213,7 +213,6 @@ SoundBuffer *SoundEmitter::allocateBuffer(const std::string &filename) char buf[512]; snprintf(buf, sizeof(buf), "Unable to decode sound: %s.%s: %s", filename.c_str(), ext, Sound_GetError()); - buf[sizeof(buf)-1] = '\0'; Debug() << buf; return 0;