From 67353d1da89d0497d6e52a29bf59f0b03775f831 Mon Sep 17 00:00:00 2001
From: Wang Renxin
Date: Mon, 31 Dec 2018 16:13:06 +0800
Subject: [PATCH] *fixed a wrong scope processing bug when resetting
interpreter.
---
HISTORY | 3 +++
LICENSE | 2 +-
README.md | 2 +-
core/my_basic.c | 6 +++++-
core/my_basic.h | 2 +-
donate.html | 16 +++++++++-------
my_basic_mac.xcodeproj/project.pbxproj | 18 +++++++++++++++++-
output/my_basic.exe | Bin 509952 -> 509952 bytes
output/my_basic_mac | Bin 232992 -> 233000 bytes
resource/my_basic.rc | 2 +-
shell/main.c | 4 ++--
11 files changed, 40 insertions(+), 15 deletions(-)
diff --git a/HISTORY b/HISTORY
index 32aeb97..647614b 100755
--- a/HISTORY
+++ b/HISTORY
@@ -1,3 +1,6 @@
+Dec. 31 2018
+Fixed a wrong scope processing bug when resetting interpreter
+
Nov. 10 2018
Fixed a mod by zero bug with real number
diff --git a/LICENSE b/LICENSE
index 5030656..0e307bb 100755
--- a/LICENSE
+++ b/LICENSE
@@ -1,6 +1,6 @@
The MIT License
-Copyright (C) 2011 - 2018 Wang Renxin
+Copyright (C) 2011 - 2019 Wang Renxin
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
diff --git a/README.md b/README.md
index 7244cfc..d869066 100755
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
|_|_|_| |_| |_____|__|__|_____|_____|_____|
~~~~~~~~~~
-**Copyright (C) 2011 - 2018 Wang Renxin**
+**Copyright (C) 2011 - 2019 Wang Renxin**
[](https://travis-ci.org/paladin-t/my_basic)
[](http://opensource.org/licenses/MIT)
diff --git a/core/my_basic.c b/core/my_basic.c
index 760f15e..92be6f4 100755
--- a/core/my_basic.c
+++ b/core/my_basic.c
@@ -3,7 +3,7 @@
**
** For the latest info, see https://github.com/paladin-t/my_basic/
**
-** Copyright (C) 2011 - 2018 Wang Renxin
+** Copyright (C) 2011 - 2019 Wang Renxin
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
@@ -12231,6 +12231,8 @@ int mb_reset(struct mb_interpreter_t** s, bool_t clrf) {
if(!s || !(*s))
return MB_FUNC_ERR;
+ (*s)->valid = false;
+
(*s)->run_count = 0;
(*s)->has_run = false;
(*s)->jump_set = _JMP_NIL;
@@ -12291,6 +12293,8 @@ int mb_reset(struct mb_interpreter_t** s, bool_t clrf) {
result = _open_constant(*s);
mb_assert(MB_FUNC_OK == result);
+ (*s)->valid = true;
+
return result;
}
diff --git a/core/my_basic.h b/core/my_basic.h
index fe5cf6a..9c32cf3 100755
--- a/core/my_basic.h
+++ b/core/my_basic.h
@@ -3,7 +3,7 @@
**
** For the latest info, see https://github.com/paladin-t/my_basic/
**
-** Copyright (C) 2011 - 2018 Wang Renxin
+** Copyright (C) 2011 - 2019 Wang Renxin
**
** Permission is hereby granted, free of charge, to any person obtaining a copy of
** this software and associated documentation files (the "Software"), to deal in
diff --git a/donate.html b/donate.html
index b581556..41a0c5f 100644
--- a/donate.html
+++ b/donate.html
@@ -1,6 +1,6 @@
@@ -10,19 +10,21 @@ LIST OF DONORS.
Donate to MY-BASIC
@@ -113,6 +115,6 @@ LIST OF DONORS.
BACK TO MY-BASIC
- Copyright (C) 2011 - 2018 Wang Renxin. All rights reserved.
+ Copyright (C) 2011 - 2019 Wang Renxin. All rights reserved.