From 90027ac8b23ec430d6e99c775c16cb72200ac5a3 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Fri, 13 Oct 2017 00:30:02 +0200 Subject: [PATCH] ui.c: Fix a typo --- source/common/ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/common/ui.c b/source/common/ui.c index a586a43..8c835d0 100644 --- a/source/common/ui.c +++ b/source/common/ui.c @@ -197,7 +197,7 @@ void TruncateString(char* dest, const char* orig, int nsize, int tpos) { int osize = strnlen(orig, 256); if (nsize < 0) { return; - } if (nsize <= 3) { + } else if (nsize <= 3) { snprintf(dest, nsize, orig); } else if (nsize >= osize) { snprintf(dest, nsize + 1, orig);