]> git.lyx.org Git - lyx.git/blobdiff - src/funcrequest.C
Two fixes involving RtL text drawing
[lyx.git] / src / funcrequest.C
index 6a9b3fd9a1605e1866b5d756b191265326fcb5c4..ea709c88984960a41c4c4567514e31e055a76475 100644 (file)
@@ -58,20 +58,22 @@ mouse_button::state FuncRequest::button() const
 }
 
 
-void split(vector<string> & args, string str)
+void split(vector<string> & args, string const & str)
 {
        istringstream is(str);
        while (is) {
                char c;
                string s;
                is >> c;
-               if (c == '"')
-                       getline(is, s, '"');
-               else {
-                       is.putback(c);
-                       is >> s;
+               if (is) {
+                       if (c == '"')
+                               getline(is, s, '"');
+                       else {
+                               is.putback(c);
+                               is >> s;
+                       }
+                       args.push_back(s);
                }
-               args.push_back(s);
        }
 }