commit 90269e535590688b37d953c316ff5c823752c38a
parent e80264ada63a81f0cd1c6e9b0aa0d68a7139ff29
Author: Egg Milk Soup <egg@milksoup.net>
Date: Fri, 10 Jun 2022 06:16:46 -0500
add type check before accessing content
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/verb.nim b/src/verb.nim
@@ -69,7 +69,7 @@ proc roll*(action: string, sheet: YamlDocument): string =
exp = try: sheet.expression(action)
except: YamlNode(kind: yScalar, tag: yTagNull, content: "")
- if exp.content == "":
+ if exp.kind == yScalar and exp.content == "":
return action & " is not a dice expression or defined expression"
var modifier: string