From 2944e4f6ae8601ca567baafbe9b6e80daae138a3 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 14 May 2014 14:08:14 +0200 Subject: [PATCH] - fixed some Linux issues with recent changes. --- src/sdl/i_main.cpp | 6 +----- src/textures/texturemanager.cpp | 2 +- src/wi_stuff.cpp | 2 +- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/sdl/i_main.cpp b/src/sdl/i_main.cpp index 1736305d8..db6979330 100644 --- a/src/sdl/i_main.cpp +++ b/src/sdl/i_main.cpp @@ -172,11 +172,7 @@ static int DoomSpecificInfo (char *buffer, char *end) } else { - char name[9]; - - strncpy (name, level.mapname, 8); - name[8] = 0; - p += snprintf (buffer+p, size-p, "\n\nCurrent map: %s", name); + p += snprintf (buffer+p, size-p, "\n\nCurrent map: %s", level.MapName); if (!viewactive) { diff --git a/src/textures/texturemanager.cpp b/src/textures/texturemanager.cpp index 9ff67803d..aa9ef706b 100644 --- a/src/textures/texturemanager.cpp +++ b/src/textures/texturemanager.cpp @@ -233,7 +233,7 @@ FTextureID FTextureManager::CheckForTexture (const char *name, int usetype, BITF { FTexture *const NO_TEXTURE = (FTexture*)-1; int lump = Wads.CheckNumForFullName(name); - if (lump != NULL) + if (lump >= 0) { FTexture *tex = Wads.GetLinkedTexture(lump); if (tex == NO_TEXTURE) return FTextureID(-1); diff --git a/src/wi_stuff.cpp b/src/wi_stuff.cpp index 0cf5e7b77..982668566 100644 --- a/src/wi_stuff.cpp +++ b/src/wi_stuff.cpp @@ -314,7 +314,7 @@ static bool IsExMy(const char * name) void WI_LoadBackground(bool isenterpic) { - const char *lumpname; + const char *lumpname = NULL; char buffer[10]; in_anim_t an; lnode_t pt;