Skip to content

Commit

Permalink
Use correct name length on comparison.
Browse files Browse the repository at this point in the history
  • Loading branch information
dthain committed Dec 18, 2023
1 parent 3a267ef commit 9e36fec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/diskfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ int diskfs_dirent_remove( struct fs_dirent *d, const char *name )
for(j=0;j<DISKFS_ITEMS_PER_BLOCK;j++) {
struct diskfs_item *r = &b->items[j];

if(r->type!=DISKFS_ITEM_BLANK && r->name_length==name_length && diskfs_name_equals(name,name_length,r->name,name_length)) {
if(r->type!=DISKFS_ITEM_BLANK && r->name_length==name_length && diskfs_name_equals(name,name_length,r->name,r->name_length)) {

if(r->type==DISKFS_ITEM_DIR) {
struct diskfs_inode inode;
Expand Down

0 comments on commit 9e36fec

Please sign in to comment.