diff --git a/HISTORY b/HISTORY index 0897879..52d1e64 100755 --- a/HISTORY +++ b/HISTORY @@ -1,3 +1,6 @@ +Oct. 23 2016 +Fixed a percent symbol printing bug, thanks to Philip Bister for pointing it out + Aug. 9 2016 Added function overriding support for class instance Fixed a multiple disposing bug with GC diff --git a/core/my_basic.c b/core/my_basic.c index 50c117a..1cdf552 100755 --- a/core/my_basic.c +++ b/core/my_basic.c @@ -16081,7 +16081,7 @@ _print: _DISPOSE_BUF(buf); setlocale(LC_ALL, loc); #else /* MB_CP_VC && MB_ENABLE_UNICODE */ - _get_printer(s)(val_ptr->data.string ? val_ptr->data.string : MB_NULL_STRING); + _get_printer(s)("%s", val_ptr->data.string ? val_ptr->data.string : MB_NULL_STRING); #endif /* MB_CP_VC && MB_ENABLE_UNICODE */ if(!val_ptr->ref && val_ptr->data.string && !pathed_str) { safe_free(val_ptr->data.string); @@ -16095,7 +16095,7 @@ _print: while((lbuf = (size_t)val_ptr->data.usertype_ref->fmt(s, val_ptr->data.usertype_ref->usertype, _CHAR_BUF_PTR(buf), (unsigned)_CHARS_OF_BUF(buf))) > _CHARS_OF_BUF(buf)) { _RESIZE_CHAR_BUF(buf, lbuf); } - _get_printer(s)(_CHAR_BUF_PTR(buf)); + _get_printer(s)("%s", _CHAR_BUF_PTR(buf)); _DISPOSE_BUF(buf); } else { _get_printer(s)(mb_get_type_string(_internal_type_to_public_type(val_ptr->type))); diff --git a/my_basic_mac.xcodeproj/project.pbxproj b/my_basic_mac.xcodeproj/project.pbxproj index 88b84a8..f63f655 100644 --- a/my_basic_mac.xcodeproj/project.pbxproj +++ b/my_basic_mac.xcodeproj/project.pbxproj @@ -101,7 +101,7 @@ 03F4D7221A1D0081009F920C /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0710; + LastUpgradeCheck = 0800; ORGANIZATIONNAME = "Wang Renxin"; TargetAttributes = { 03F4D7291A1D0081009F920C = { @@ -152,8 +152,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; @@ -161,6 +163,7 @@ ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", @@ -193,8 +196,10 @@ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = YES; @@ -202,6 +207,7 @@ ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; diff --git a/output/my_basic.exe b/output/my_basic.exe index a5a2bbc..4019410 100755 Binary files a/output/my_basic.exe and b/output/my_basic.exe differ diff --git a/output/my_basic_mac b/output/my_basic_mac index 5b98596..36c0807 100755 Binary files a/output/my_basic_mac and b/output/my_basic_mac differ