From 5ad99239c501e5b08d263d7960e9e81c592dd558 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Sun, 2 Aug 2020 17:07:04 +0200 Subject: [PATCH] Fragment system caching working across Windows and MacOs - because it uses two hashes, one for CR and another for CRLF. Closes #490 --- .../dk/camelot64/kickc/fragment/AsmFragmentSystemHash.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSystemHash.java b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSystemHash.java index f91049df9..c0468841d 100644 --- a/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSystemHash.java +++ b/src/main/java/dk/camelot64/kickc/fragment/AsmFragmentSystemHash.java @@ -56,7 +56,7 @@ public class AsmFragmentSystemHash { long lengthLF; long lengthCRLF; if(allSystems) { - // Calculate length for all systems by reading the file + // Calculate length for all systems by reading the file (slow!) int fileNewlines = getFileNewlineCount(file); if(isSystemLF()) { lengthLF = file.length(); @@ -66,7 +66,7 @@ public class AsmFragmentSystemHash { lengthCRLF = file.length(); } } else { - // Only find length for current system - set other to zero + // Use filesystem length for current system only - set other to zero (fast!) if(isSystemLF()) { lengthLF = file.length(); lengthCRLF = 0;