summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authormrmcwethy <mrmcwethy@yahoo.com>2017-11-22 19:56:28 -0700
committerScott Shawcroft <scott@tannewt.org>2017-11-22 22:57:50 -0800
commita38d8948b3b22a7b3f84284f765578a8edeab3f5 (patch)
tree8cbb96ff436f5dbf8bca98e35e2f7ad65db4e7a8 /main.c
parentd016bcdf82bbee7f800bc80f60d6c13d756113d5 (diff)
M4 status LED flashing with no main.py present #447 Initialized stack variable
Diffstat (limited to 'main.c')
-rw-r--r--main.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/main.c b/main.c
index 7ed93ddf5..21940d795 100644
--- a/main.c
+++ b/main.c
@@ -131,6 +131,11 @@ bool start_mp(safe_mode_t safe_mode) {
#endif
pyexec_result_t result;
+
+ result.return_code = 0;
+ result.exception_type = NULL;
+ result.exception_line = 0;
+
bool found_main = false;
if (safe_mode != NO_SAFE_MODE) {
@@ -166,9 +171,10 @@ bool start_mp(safe_mode_t safe_mode) {
if (reload_next_character) {
return true;
}
+
if (serial_connected() && serial_bytes_available()) {
// Skip REPL if reload was requested.
- return serial_read() == CHAR_CTRL_D;
+ return (serial_read() == CHAR_CTRL_D);
}
if (!serial_connected_before_animation && serial_connected()) {