From 36edc285aa105c4b96714203b0e4a05450b37253 Mon Sep 17 00:00:00 2001 From: a dinosaur Date: Sun, 12 May 2019 17:43:03 +1000 Subject: [PATCH] reset getopt state using the proper method on unices, fixes macos. ...honestly getopt sucks and I should replace it with something actually cross platform and less crude. --- src/tmx2gba.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tmx2gba.cpp b/src/tmx2gba.cpp index bc5f1d9..f98a85c 100644 --- a/src/tmx2gba.cpp +++ b/src/tmx2gba.cpp @@ -79,10 +79,12 @@ struct SParams void GetoptClear () { +#ifdef _MSC_VER optarg = nullptr; optind = 0; -#ifdef _MSC_VER next = nullptr; +#else + optreset = 1; #endif }