From 631e7094711befcfb81a33fd677b7e19d5747ed7 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Thu, 23 Feb 2006 22:55:43 +0000 Subject: [PATCH] fixed bug where the string lenght wasnt decreased on some cases --- amxmodx/format.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/amxmodx/format.cpp b/amxmodx/format.cpp index e5371b57..0b39384a 100644 --- a/amxmodx/format.cpp +++ b/amxmodx/format.cpp @@ -390,13 +390,16 @@ reswitch: } case '%': *buf_p++ = static_cast(ch); + llen--; break; case '\0': *buf_p++ = static_cast('%'); + llen--; goto done; break; default: *buf_p++ = static_cast(ch); + llen--; break; } }