From 204f4eefd84d267c416ca2e1e9a82d5580bdd9d0 Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Tue, 22 Oct 2002 15:34:29 +0000 Subject: [PATCH] Cleanup. committer: mfx 1035300869 +0000 --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.cpp b/src/util.cpp index 7b18f069..fb49e110 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -537,7 +537,7 @@ unsigned get_ratio(unsigned u_len, unsigned c_len) { const unsigned n = 1000000; if (u_len <= 0) - return n; + return c_len <= 0 ? 0 : n; return (unsigned) ((c_len * (upx_uint64l)n) / u_len) + 5; }