Fixup a potential division by zero (that happens anyway in my tests).
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 23 Nov 2014 19:16:41 +0000 (19:16 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sun, 23 Nov 2014 19:16:41 +0000 (19:16 +0000)
svn path=/trunk/; revision=65467

reactos/base/applications/taskmgr/perfpage.c

index a14b479..84b4923 100644 (file)
@@ -374,7 +374,7 @@ DWORD WINAPI PerformancePageRefreshThread(void *lpParameter)
                                sizeof(szChargeLimitFormat));
 
             wsprintfW(Text, szMemUsage, szChargeTotalFormat, szChargeLimitFormat,
-                      (UINT)((CommitChargeTotal * 100) / CommitChargeLimit));
+                      (CommitChargeLimit ? ((CommitChargeTotal * 100) / CommitChargeLimit) : 0));
 
             SendMessageW(hStatusWnd, SB_SETTEXT, 2, (LPARAM)Text);