1.1 --- a/core/smn_core.cpp Sat Mar 22 17:06:37 2014 -0400
1.2 +++ b/core/smn_core.cpp Sun Mar 23 17:07:51 2014 -0400
1.3 @@ -682,11 +682,11 @@
1.4
1.5 if (addr == NULL)
1.6 {
1.7 - pContext->ThrowNativeError("Address cannot be null");
1.8 + return pContext->ThrowNativeError("Address cannot be null");
1.9 }
1.10 else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
1.11 {
1.12 - pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
1.13 + return pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
1.14 }
1.15 NumberType size = static_cast<NumberType>(params[2]);
1.16
1.17 @@ -699,10 +699,8 @@
1.18 case NumberType_Int32:
1.19 return *reinterpret_cast<uint32_t*>(addr);
1.20 default:
1.21 - pContext->ThrowNativeError("Invalid number types %d", size);
1.22 + return pContext->ThrowNativeError("Invalid number types %d", size);
1.23 }
1.24 -
1.25 - return 1;
1.26 }
1.27
1.28
1.29 @@ -712,11 +710,11 @@
1.30
1.31 if (addr == NULL)
1.32 {
1.33 - pContext->ThrowNativeError("Address cannot be null");
1.34 + return pContext->ThrowNativeError("Address cannot be null");
1.35 }
1.36 else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
1.37 {
1.38 - pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
1.39 + return pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
1.40 }
1.41 cell_t data = params[2];
1.42
1.43 @@ -737,10 +735,10 @@
1.44 *reinterpret_cast<uint32_t*>(addr) = data;
1.45 break;
1.46 default:
1.47 - pContext->ThrowNativeError("Invalid number types %d", size);
1.48 + return pContext->ThrowNativeError("Invalid number types %d", size);
1.49 }
1.50
1.51 - return 1;
1.52 + return 0;
1.53 }
1.54
1.55 REGISTER_NATIVES(coreNatives)