mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-31 01:11:06 +02:00
gui/hdd_menu.cpp: prevent divide by zero
Origin commit data
------------------
Branch: ni/coolstream
Commit: 9b697fb52b
Author: [CST] Focus <focus.cst@gmail.com>
Date: 2014-09-12 (Fri, 12 Sep 2014)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -891,6 +891,8 @@ int CHDDMenuHandler::formatDevice(std::string dev)
|
||||
break;
|
||||
case 1:
|
||||
if (in == '\b' && sscanf(buf, "%d/%d\b", &n, &t) == 2) {
|
||||
if (t == 0)
|
||||
t = 1;
|
||||
int percent = 100 * n / t;
|
||||
progress->showLocalStatus(percent);
|
||||
progress->showGlobalStatus(20 + percent / 5);
|
||||
|
Reference in New Issue
Block a user