Skip to content

Commit

Permalink
fix: prevent Argon crash when using 'trap' keyword with non-existent …
Browse files Browse the repository at this point in the history
…variables
  • Loading branch information
jacopodl committed Jul 26, 2024
1 parent c88a5cd commit 444d900
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.15)
project(Argon VERSION 0.5.2)
project(Argon VERSION 0.6.0)

set(AR_MAJOR ${PROJECT_VERSION_MAJOR})
set(AR_MINOR ${PROJECT_VERSION_MINOR})
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
</p>

<p align="center">
<a href="https://img.shields.io/badge/version-0.5.2--alpha-red">
<img src="https://img.shields.io/badge/version-0.5.2--alpha-red" alt="Version 0.5.2-alpha">
<a href="https://img.shields.io/badge/version-0.6.0--alpha-red">
<img src="https://img.shields.io/badge/version-0.6.0--alpha-red" alt="Version 0.6.0-alpha">
</a>
<a href="https://www.apache.org/licenses/LICENSE-2.0">
<img src="https://img.shields.io/badge/license-apache--2.0-blue" alt="Apache License 2.0">
Expand Down
4 changes: 4 additions & 0 deletions argon/vm/areval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -988,8 +988,12 @@ ArObject *argon::vm::Eval(Fiber *fiber) {
}

ErrorFormat(kUndeclaredeError[0], kUndeclaredeError[1], ARGON_RAW_STRING((String *) key));

Release(key);

// Prevent crash when using 'trap' keyword with non-existent variables
PUSH(nullptr);

break;
}
TARGET_OP(LDITER) {
Expand Down

0 comments on commit 444d900

Please sign in to comment.