From 20f5a815175948a723decbfd4301a126a3195963 Mon Sep 17 00:00:00 2001 From: Kelvin Sherlock Date: Wed, 26 Aug 2015 09:09:44 -0400 Subject: [PATCH] fix dirent string compare --- get_dir_entry.aii | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/get_dir_entry.aii b/get_dir_entry.aii index 8fabd90..e039dd4 100644 --- a/get_dir_entry.aii +++ b/get_dir_entry.aii @@ -808,7 +808,7 @@ strcmp procname ; check if the name is even possible... - with dp + with dp, data import target:GSString32 @@ -824,8 +824,9 @@ strcmp procname adc io_buffer+2 sta ptr+2 - ldx target.length ldy #0 + ldx target.length + short m ; y = offset @@ -835,21 +836,21 @@ loop beq eos cmp target.text,y bne no8 - iny + iny dex - bne loop + bpl loop + +eos long m + ; if y == target.length, this is a match. + cpy target.length + bne no + yes ;~DebugSetTrace #0 clc rts -eos - long m - ; end of string. if x = 1, it's a match! - dex - beq yes - no8 long m