Skip to content

Commit

Permalink
Shorten nds-bootstrap nightly string to 7 chars.
Browse files Browse the repository at this point in the history
  • Loading branch information
RocketRobz committed Aug 27, 2024
1 parent a76c9e8 commit 2d92126
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions settings/arm9/source/settingsgui.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,13 @@ class SettingsGUI
bsVerFile = fopen("/_nds/release-bootstrap.ver", "rb");
}
if (bsVerFile) {
fseek(bsVerFile, 0, SEEK_END);
uint len = ftell(bsVerFile);
fseek(bsVerFile, 0, SEEK_SET);
fread(bsVerText[i], 1, std::max(len, sizeof(bsVerText[i]) - 1), bsVerFile);
uint len = 7;
if (i == 0) {
fseek(bsVerFile, 0, SEEK_END);
len = ftell(bsVerFile);
fseek(bsVerFile, 0, SEEK_SET);
}
fread(bsVerText[i], 1, (i == 1) ? len : std::max(len, sizeof(bsVerText[i]) - 1), bsVerFile);
} else {
snprintf(bsVerText[i], sizeof(bsVerText[i]), "%s", "No version available");
}
Expand Down

0 comments on commit 2d92126

Please sign in to comment.