From 05cd1025daeaebf02d8764dcbba8b410427dd673 Mon Sep 17 00:00:00 2001 From: Nicolas Cannasse Date: Fri, 18 Aug 2023 10:36:59 +0200 Subject: [PATCH] bugfix with dir is null --- other/memory/Memory.hx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/other/memory/Memory.hx b/other/memory/Memory.hx index 938097967..52fc27f30 100644 --- a/other/memory/Memory.hx +++ b/other/memory/Memory.hx @@ -774,7 +774,9 @@ class Memory { m.loadMemory(arg); } if( code != null && memory == null ) { - memory = new haxe.io.Path(code).dir+"/hlmemory.dump"; + var dir = new haxe.io.Path(code).dir; + if( dir == null ) dir = "."; + memory = dir+"/hlmemory.dump"; if( sys.FileSystem.exists(memory) ) m.loadMemory(memory); }