From 09b2d58c14eee7e8ac1f2310d9b92cc8754d751a Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 8 Mar 2005 15:50:12 +0000 Subject: [PATCH] added line to remove trailing ';' git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@203 9efc2488-bf62-4759-914b-345cdb29e865 --- src/srfsh/srfsh.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index c231cd3..126ff2a 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -279,6 +279,9 @@ int handle_request( char* words[], int relay ) { buffer = buffer_init(128); buffer_add(buffer, "["); for(i = 3; words[i] != NULL; i++ ) { + /* removes trailing semicolon if user accidentally enters it */ + if( words[i][strlen(words[i])-1] == ';' ) + words[i][strlen(words[i])-1] = '\0'; buffer_add( buffer, words[i] ); buffer_add(buffer, " "); } -- 2.11.0