Fixed crash caused by invalid pandoc urls
authorLukas Lueg <lukas.lueg@gmail.com>
Sat, 11 Apr 2015 14:42:08 +0000 (16:42 +0200)
committerLukas Lueg <lukas.lueg@gmail.com>
Sat, 11 Apr 2015 14:42:08 +0000 (16:42 +0200)
src/viewer.c

index 91633e8..1b2e6b9 100644 (file)
@@ -713,7 +713,7 @@ void inline_display(WINDOW *window, const wchar_t *c, const int colors) {
 
                         if (*i == L'!') i++;
 
-                        if (wcschr(i, L']')[1] == L'(') {
+                        if (wcschr(i, L']')[1] == L'(' && wcschr(i, L')')) {
                             i++;
 
                             // turn higlighting and underlining on