From 3068b5bcb2a1edb5ba6306bfb292020919ca6f91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Wed, 21 Sep 2022 15:19:46 +0800 Subject: [PATCH] Memory: fix percentage calculation --- src/detection/memory/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/detection/memory/memory.c b/src/detection/memory/memory.c index 14b86cc39..f777554c3 100644 --- a/src/detection/memory/memory.c +++ b/src/detection/memory/memory.c @@ -5,7 +5,7 @@ void ffDetectMemoryImpl(FFMemoryResult* memory); static void calculatePercentage(FFMemoryStorage* storage) { - if(storage->error.length == 0) + if(storage->error.length != 0) return; if(storage->bytesTotal == 0)