rpgsheet

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 32e312d2f9f7482c87df2551f3cc44a295e37784
parent e048b6050b6501361a5fbdde4aa384eaff975e6c
Author: Skylar Hill <stellarskylark@posteo.net>
Date:   Sat,  4 Jun 2022 20:44:04 -0500

Fix bug that causes crash when expression is not set

Diffstat:
Mrpgsheet.nimble | 2+-
Msrc/verb.nim | 3+++
2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/rpgsheet.nimble b/rpgsheet.nimble @@ -1,6 +1,6 @@ # Package -version = "0.1.4" +version = "0.1.5" author = "Skylar Hill" description = "CLI/TUI application for TTRPG character sheets" license = "GPL-3.0-only" diff --git a/src/verb.nim b/src/verb.nim @@ -25,6 +25,9 @@ proc expressionAsString(node: YamlNode): string = result = result & fmt"""Window: {node.getContent("window")}""" proc calculateModifier(exp: string, sheet: YamlDocument): string = + if exp == "": + return "0" + var working = exp if exp.contains(reProcessedExp): # I think that execCmdEx adds whitespace in input;