]> git.sesse.net Git - vlc/commitdiff
cli: use dedicated strip function
authorPierre Ynard <linkfanel@yahoo.fr>
Sat, 2 Apr 2011 17:27:07 +0000 (19:27 +0200)
committerPierre Ynard <linkfanel@yahoo.fr>
Sat, 2 Apr 2011 17:27:07 +0000 (19:27 +0200)
share/lua/intf/cli.lua

index 567f07c6411cdbccdff2b865cc3abe74ce30bf44..dc0a55c7c10839b268ef82183bc785810dc59297 100644 (file)
@@ -802,7 +802,7 @@ while not vlc.misc.should_die() do
 
             -- get the next command
             local index = string.find(client.cmds, "\n")
-            client.buffer = string.gsub(string.sub(client.cmds, 0, index - 1), "^%s*(.-)%s*$", "%1")
+            client.buffer = strip(string.sub(client.cmds, 0, index - 1))
             client.cmds = string.sub(client.cmds, index + 1)
 
             -- Remove telnet commands from the command line