From fb652eee3047db441a600f7653263fa4d1913dfc Mon Sep 17 00:00:00 2001 From: Jonathan Bernard Date: Mon, 16 Mar 2020 08:32:56 -0500 Subject: [PATCH] Fix double-free in edit functionality (double-closing file handle). --- private/version.nim | 2 +- ptk.nim | 1 + ptk.nimble | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/private/version.nim b/private/version.nim index 345cd21..b010ea6 100644 --- a/private/version.nim +++ b/private/version.nim @@ -1 +1 @@ -const PTK_VERSION* = "1.0.2" \ No newline at end of file +const PTK_VERSION* = "1.0.3" \ No newline at end of file diff --git a/ptk.nim b/ptk.nim index dbaf963..ff75bc5 100644 --- a/ptk.nim +++ b/ptk.nim @@ -144,6 +144,7 @@ proc edit(mark: var Mark): void = # notes for this timeline mark.""") close(tempFile) + tempFile = nil discard os.execShellCmd "$EDITOR " & tempFileName & " /dev/tty" diff --git a/ptk.nimble b/ptk.nimble index 457bc41..8dc902d 100644 --- a/ptk.nimble +++ b/ptk.nimble @@ -1,6 +1,6 @@ # Package -version = "1.0.2" +version = "1.0.3" author = "Jonathan Bernard" description = "Personal Time Keeper" license = "MIT"