# HG changeset patch # User Mike Miller # Date 1376358549 14400 # Node ID 06824c3b1ff3fc1584d34db80ef999020d48709c # Parent f95bb8763f4ee813702b568bf0a3c679ea838e69 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. diff --git a/liboctave/util/oct-rl-hist.c b/liboctave/util/oct-rl-hist.c --- 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; }