Code

Fix off by one error; makes tags visible again
authorJonas Fonseca <fonseca@diku.dk>
Fri, 26 May 2006 20:26:32 +0000 (22:26 +0200)
committerJonas Fonseca <fonseca@antimatter.localdomain>
Fri, 26 May 2006 20:26:32 +0000 (22:26 +0200)
Fixes: d0cea5f929be563d049bc5205fb8de08fd080c32
tig.c

diff --git a/tig.c b/tig.c
index cba8c82da3ee794e69e0772403407c8cb538e7bc..a5d9df39393c24716661e323bc05bb08cd121958 100644 (file)
--- a/tig.c
+++ b/tig.c
@@ -2420,8 +2420,10 @@ read_properties(const char *cmd, int separator,
                        namelen = value - name;
                        *value++ = 0;
                        valuelen = strlen(value);
-                       if (valuelen > 0)
-                               value[valuelen - 1] = 0;
+                       if (valuelen > 0) {
+                               valuelen--;
+                               value[valuelen] = 0;
+                       }
 
                } else {
                        namelen = strlen(name);