diff options
Diffstat (limited to 'wear_ui.cpp')
-rw-r--r-- | wear_ui.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/wear_ui.cpp b/wear_ui.cpp index bfa7097ea..3ea1060e4 100644 --- a/wear_ui.cpp +++ b/wear_ui.cpp @@ -293,8 +293,8 @@ int WearRecoveryUI::SelectMenu(int sel) { } void WearRecoveryUI::ShowFile(FILE* fp) { - std::vector<long> offsets; - offsets.push_back(ftell(fp)); + std::vector<off_t> offsets; + offsets.push_back(ftello(fp)); ClearText(); struct stat sb; @@ -304,7 +304,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) { while (true) { if (show_prompt) { Print("--(%d%% of %d bytes)--", - static_cast<int>(100 * (double(ftell(fp)) / double(sb.st_size))), + static_cast<int>(100 * (double(ftello(fp)) / double(sb.st_size))), static_cast<int>(sb.st_size)); Redraw(); while (show_prompt) { @@ -323,7 +323,7 @@ void WearRecoveryUI::ShowFile(FILE* fp) { if (feof(fp)) { return; } - offsets.push_back(ftell(fp)); + offsets.push_back(ftello(fp)); } } ClearText(); |