smbc_telldir_ctx() returns a pointer to smbc_dir_list (dir->dir_next) as an offset, but smbc_check_dir_ent(), called from smbc_lseekdir_ctx(), compares an offset with a pointer to smbc_dirent.
Created attachment 2787 [details] Patch Return dir->dir_next->dirent (or -1 on the ending of the list).
Patch applied. Thanks!