diff --git a/appveyor.yml b/appveyor.yml index 2aef9c9423e10b6671bbddb86c4f159335b69f26..b0d87a79e5da3885c61d060c2a615cf3092ee22e 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -14,6 +14,5 @@ build_script: } - call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" %VCVARS_PLATFORM% - call tools\windows\build.bat -# FIXME(windows) TODO(uucidl): reactivate examples -# - call tools\windows\build_examples.bat +- call tools\windows\build_examples.bat - exit /b 0 diff --git a/examples/grammar.c b/examples/grammar.c index 7638fe99558149d9e2d47e5d1dc7f0299da189c1..a768060b3dd2ed1c751076427c8bd6459918f914 100644 --- a/examples/grammar.c +++ b/examples/grammar.c @@ -22,11 +22,12 @@ const char *nonterminal_name(const HCFGrammar *g, const HCFChoice *nt) { // if user_data exists and is printable: if(nt->user_data != NULL && *(char*)(nt->user_data) > ' ' && *(char*)(nt->user_data) < 127) { - if(*(char*)(nt->user_data) != '0') { + char* user_str = (char*)(nt->user_data); + if(*user_str != '\0') { // user_data is a non-empty string - return nt->user_data; + return user_str; } else { - return nt->user_data+1; + return user_str+1; } }