1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-26 07:22:20 +00:00

silence warning

This commit is contained in:
Zeno Rogue 2025-08-17 23:16:57 +02:00
parent 7c2e312aa1
commit 9c378418b0

View File

@ -3624,11 +3624,12 @@ EX void load_customchar(charstyle& cs, const string& fname) {
FILE *f = fopen(fname.c_str(), "rt");
if(!f) throw hstream_exception();
int vernum;
fscanf(f, "%x", &vernum);
if(!fscanf(f, "%x", &vernum)) throw hstream_exception();
int lh;
fscanf(f, "%d %d\n%08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
if(!fscanf(f, "%d %d\n%08x %08x %08x %08x %08x %08x %08x %08x %08x\n",
&cs.charid, &lh,
&cs.skincolor, &cs.haircolor, &cs.dresscolor, &cs.swordcolor, &cs.dresscolor2, &cs.uicolor, &cs.eyecolor, &cs.bowcolor, &cs.bowcolor2);
&cs.skincolor, &cs.haircolor, &cs.dresscolor, &cs.swordcolor, &cs.dresscolor2, &cs.uicolor, &cs.eyecolor, &cs.bowcolor, &cs.bowcolor2))
throw hstream_exception();
cs.lefthanded = lh;
fclose(f);
}