changeset 17231:06824c3b1ff3

Remove spurious leading space in unnumbered history list (bug #39724) * oct-rl-hist.c (octave_history_list): Eliminate conditional on unused data field associated with history. Remove spurious leading space character when returning an unnumbered history list.
author Mike Miller <mtmiller@ieee.org>
date Mon, 12 Aug 2013 21:49:09 -0400
parents f95bb8763f4e
children 46805642048f
files liboctave/util/oct-rl-hist.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/util/oct-rl-hist.c
+++ b/liboctave/util/oct-rl-hist.c
@@ -289,12 +289,10 @@
           char *tmp = malloc (len + 64);
 
           if (number_lines)
-            sprintf (tmp, "%5d%c%s", i + history_base,
-                     hlist[i]->data ? '*' : ' ',
+            sprintf (tmp, "%5d %s", i + history_base,
                      line ? line : "");
           else
-            sprintf (tmp, "%c%s", hlist[i]->data ? '*' : ' ',
-                     line ? line : "");
+            strcpy (tmp, line ? line : "");
 
           retval[k++] = tmp;
         }