From 59ffcaf8bcb38fb5b5d29b76a119705b7ab104c0 Mon Sep 17 00:00:00 2001 From: HeRaNO Date: Wed, 6 Sep 2023 15:38:48 +0800 Subject: [PATCH] fix: make stringToLongLong refuse empty string --- testlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testlib.h b/testlib.h index 91fd4c4..a5956f1 100644 --- a/testlib.h +++ b/testlib.h @@ -3582,7 +3582,7 @@ static inline long long stringToLongLong(InStream &in, const char *buffer) { if (length > 1 && buffer[0] == '-') minus = true; - if (length > 20) + if (length == 0 || length > 20) in.quit(_pe, ("Expected integer, but \"" + __testlib_part(buffer) + "\" found").c_str()); long long retval = 0LL;