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:
[CST] Focus
2014-09-12 11:35:58 +04:00
parent acb8725806
commit 5b33660ea7

View File

@@ -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);