mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-27 02:20:36 +00:00
fixed a possible crash with bad Steam data
This commit is contained in:
parent
d9a03ab1d3
commit
bc22d17a16
@ -108,7 +108,11 @@ string displayfor(int scoredisplay, score* S, bool shorten = false) {
|
|||||||
return buf;
|
return buf;
|
||||||
}
|
}
|
||||||
if(scoredisplay == POSSCORE) return modedesc(S);
|
if(scoredisplay == POSSCORE) return modedesc(S);
|
||||||
if(scoredisplay == 68) return S->yasc_message + XLAT(" in %the1", eLand(S->box[68]));
|
if(scoredisplay == 68) {
|
||||||
|
eLand which = eLand(S->box[68]);
|
||||||
|
if(which >= landtypes || which < 0) return "fail";
|
||||||
|
return S->yasc_message + XLAT(" in %the1", which);
|
||||||
|
}
|
||||||
if(scoredisplay == 1) {
|
if(scoredisplay == 1) {
|
||||||
time_t tim = S->box[1];
|
time_t tim = S->box[1];
|
||||||
char buf[128]; strftime(buf, 128, "%c", localtime(&tim));
|
char buf[128]; strftime(buf, 128, "%c", localtime(&tim));
|
||||||
|
Loading…
Reference in New Issue
Block a user