fix regression in cae4336

rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Sun, 17 May 2026 09:27:01 -0400
Newsgroups gmane.comp.systems.archos.rockbox.cvs
Message-ID <[email protected]>
commit 8abc859c3274bc299c06d57e7f139855a0089c77
Author: Christian Soffke <[email protected]>
Date:   Sun May 17 14:45:57 2026 +0200

    fix regression in cae4336
    
    Change-Id: I026fe919401bbe13cef161a6eb6ce44e5fbbbb6f

diff --git a/apps/misc.c b/apps/misc.c
index 22486ab949..7a11afdce1 100644
--- a/apps/misc.c
+++ b/apps/misc.c
@@ -1432,8 +1432,9 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
 
 #if 0 /* unused */
         left_offset  = -(offsets[max_idx]);
-        left_offset += strlcpy(buffer, sign, buf_len);
+        left_offset +=
 #endif
+        strlcpy(buffer, sign, buf_len);
 
         /* trim leading zero on the max_idx */
         if ((unit_idx & UNIT_TRIM_ZERO) == UNIT_TRIM_ZERO &&
@@ -1479,8 +1480,9 @@ const char *format_time_auto(char *buffer, int buf_len, long value,
         {
             strmemccpy(buffer, unit_strings_core[units[max_idx]], buf_len);
 #if 0 /* unused */
-            left_offset += strlcat(buffer, " ", buf_len);
+            left_offset +=
 #endif
+            strlcat(buffer, " ", buf_len);
             strlcat(buffer, &timebuf[offsets[base_idx]], buf_len);
         }
         else
-- 
rockbox-cvs mailing list
[email protected]
https://lists.haxx.se/mailman/listinfo/rockbox-cvs