Fix off by one error; makes tags visible again
[tig] / tig.c
diff --git a/tig.c b/tig.c
index cba8c82..a5d9df3 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);