File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -97,7 +97,7 @@ struct LogPass : public Pass {
9797 text += args[argidx] + ' ' ;
9898 if (!text.empty ()) text.resize (text.size ()-1 );
9999
100- if (text[0 ] == ' "' && text[text.size ()-1 ] == ' "' )
100+ if (text. size () > 1 && text [0 ] == ' "' && text[text.size ()-1 ] == ' "' )
101101 text = text.substr (1 , text.size ()-2 );
102102
103103 const char *fmtline = newline ? " %s\n " : " %s" ;
Original file line number Diff line number Diff line change @@ -31,7 +31,10 @@ test_log "\"!bang\"" "!bang"
3131test_log " \" spaces are cool too\" " " spaces are cool too"
3232test_log " \" log a\" ; log b" " log a"
3333test_log " \" log a\" ; log b" " b"
34+ test_log " \" " " \" "
35+ test_log " \\\" " " \\\\\" " # \" == \"
3436
35- if [ -f quotes-* .err ] ; then
37+ errors=( quotes-* .err )
38+ if [ -f $errors ] ; then
3639 exit 1
3740fi
You can’t perform that action at this time.
0 commit comments