Skip to content

Commit 2f0c6bc

Browse files
committed
Changed debug mode define to avoid linker issues on MacOS
1 parent 659937f commit 2f0c6bc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ if (CMAKE_SYSTEM MATCHES "Darwin")
116116
endif()
117117

118118
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
119-
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_ENABLE_DEBUG_MODE")
119+
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_ENABLE_ASSERTIONS=1")
120120
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
121121
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_GLIBCXX_ASSERTIONS")
122122
endif()

src/markdown.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,10 +662,10 @@ size_t Markdown::Private::findEmphasisChar(std::string_view data, char c, size_t
662662
!(data[i]=='/' && data[i-1]=='<') && // html end tag also ends emphasis
663663
data[i]!='\n') i++;
664664
// avoid overflow (unclosed emph token)
665-
if (i==size)
666-
{
667-
return 0;
668-
}
665+
//if (i==size)
666+
//{
667+
// return 0;
668+
//}
669669
//printf("findEmphasisChar: data=[%s] i=%d c=%c\n",data,i,data[i]);
670670

671671
// not counting escaped chars or characters that are unlikely

0 commit comments

Comments
 (0)