$NetBSD: patch-ai,v 1.1 2006/10/13 13:04:31 is Exp $ --- vfat.c.orig 2005-02-13 15:40:17.000000000 +0100 +++ vfat.c @@ -238,7 +238,7 @@ int write_vfat(Stream_t *Dir, char *shor printf("Wrote checksum=%d for shortname %s.\n", vse->sum,shortname); #endif - num_vses = strlen(longname)/VSE_NAMELEN + 1; + num_vses = (strlen(longname) + VSE_NAMELEN - 1)/VSE_NAMELEN; for (vse_id = num_vses; vse_id; --vse_id) { int end = 0;