From 5615e656c54bb68df068c735e35c62cca8f7fd62 Mon Sep 17 00:00:00 2001
From: Rob Swindell <rob@synchro.net>
Date: Thu, 14 Jul 2022 17:50:58 -0700
Subject: [PATCH] Strip 0xff chars from strings read from .cnf files

Some unused/padding bytes are written as 0xff, so don't build strings from
those chars.
---
 exec/load/cnflib.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/exec/load/cnflib.js b/exec/load/cnflib.js
index 6f9e16a159..70c444ca67 100644
--- a/exec/load/cnflib.js
+++ b/exec/load/cnflib.js
@@ -21,7 +21,7 @@ var CNF = new (function() {
 		}
 		else {
 			var s = file.read(bytes);
-			return s.replace(/\0/g,'');
+			return s.replace(/\0|\xff/g,'');
 		}
 	}
 
-- 
GitLab