From 2defaa4b745d48947378f3ab43e80173cd696633 Mon Sep 17 00:00:00 2001 From: TehRealSalt Date: Mon, 10 Sep 2018 15:15:14 -0400 Subject: [PATCH] .PNG error shows lump name --- src/w_wad.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/w_wad.c b/src/w_wad.c index 9df2065f..89fdadde 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -782,7 +782,12 @@ static size_t W_RawReadLumpHeader(UINT16 wad, UINT16 lump, void *dest, size_t si && sigcheck[5] == 0x0a && sigcheck[6] == 0x1a && sigcheck[7] == 0x0a) - I_Error("W_Wad: Tried to cache a .PNG - have you tried converting to Doom or Flat (raw) image formats?"); + { + char pnglump[9]; + strncpy(pnglump, l->name, 8); + pnglump[8] = '\0'; + I_Error("W_Wad: Lump \"%s\" is a .PNG - have you tried converting to Doom or Flat (raw) image formats?", pnglump); + } #undef sigcheck #endif