From: Lukas Lueg Date: Sat, 11 Apr 2015 14:42:08 +0000 (+0200) Subject: Fixed crash caused by invalid pandoc urls X-Git-Url: https://git.danieliu.xyz/?a=commitdiff_plain;h=2dcbfd8e30e5fe7109600349ebb2438223b12736;p=smdp.git Fixed crash caused by invalid pandoc urls --- diff --git a/src/viewer.c b/src/viewer.c index 91633e8..1b2e6b9 100644 --- a/src/viewer.c +++ b/src/viewer.c @@ -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