From bf6a053c648576c1e5493f2d5390eb78b2e3df1c Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 1 Jul 2017 13:48:31 -0700 Subject: Saturating floating point computation. --- src/base/cmd/cmdHist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/base') diff --git a/src/base/cmd/cmdHist.c b/src/base/cmd/cmdHist.c index 36e546a7..218d832f 100644 --- a/src/base/cmd/cmdHist.c +++ b/src/base/cmd/cmdHist.c @@ -57,7 +57,7 @@ void Cmd_HistoryAddCommand( Abc_Frame_t * p, const char * command ) return; Len = strlen(command); strcpy( Buffer, command ); - if ( Buffer[Len-1] == '\n' ) + if ( Len > 0 && Buffer[Len-1] == '\n' ) Buffer[Len-1] = 0; if ( strlen(Buffer) > 3 && strncmp(Buffer,"set",3) && -- cgit v1.2.3