diff --git a/src/blua/ldump.c b/src/blua/ldump.c index c9d3d4870..b69a12729 100644 --- a/src/blua/ldump.c +++ b/src/blua/ldump.c @@ -60,7 +60,7 @@ static void DumpVector(const void* b, int n, size_t size, DumpState* D) static void DumpString(const TString* s, DumpState* D) { - if (s==NULL || getstr(s)==NULL) + if (s==NULL) { size_t size=0; DumpVar(size,D); diff --git a/src/k_race.c b/src/k_race.c index f459e7a80..fde4c9be2 100644 --- a/src/k_race.c +++ b/src/k_race.c @@ -125,7 +125,7 @@ boolean K_GenerateFinishBeamLine(void) mapthing_t *mt; INT64 bounds[4]; - angle_t angle; + angle_t angle = 0; boolean valid = false; size_t i; diff --git a/src/m_menu.c b/src/m_menu.c index 1c5191127..c1c8c114d 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -6344,7 +6344,7 @@ static void M_RetryResponse(INT32 ch) if (ch != 'y' && ch != KEY_ENTER) return; - if (!&players[consoleplayer] || netgame || multiplayer) // Should never happen! + if (netgame || multiplayer) // Should never happen! return; M_ClearMenus(true); diff --git a/src/m_misc.c b/src/m_misc.c index cf5053078..8146cceec 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -851,7 +851,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png else snprintf(lvlttltext, 48, "Unknown"); - if (gamestate == GS_LEVEL && &players[g_localplayers[0]] && players[g_localplayers[0]].mo) + if (gamestate == GS_LEVEL && players[g_localplayers[0]].mo) snprintf(locationtxt, 40, "X:%d Y:%d Z:%d A:%d", players[g_localplayers[0]].mo->x>>FRACBITS, players[g_localplayers[0]].mo->y>>FRACBITS, diff --git a/src/w_wad.c b/src/w_wad.c index df8df7928..e1cb6b1aa 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -637,8 +637,6 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp) lump_p->fullname = Z_Calloc(zentry.namelen + 1, PU_STATIC, NULL); strncpy(lump_p->fullname, fullname, zentry.namelen); - free(fullname); - switch(zentry.compression) { case 0: @@ -658,6 +656,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp) break; } + free(fullname); + // skip and ignore comments/extra fields if (fseek(handle, zentry.xtralen + zentry.commlen, SEEK_CUR) != 0) {