From fae423fb5442084dff3ab3e73257b007dbf8e328 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Wed, 23 May 2012 20:58:31 +0200 Subject: [PATCH] Bug fix: The separator dot of Joliet names was byte swapped on big-endian machines. --- libisofs/joliet.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libisofs/joliet.c b/libisofs/joliet.c index 3d17b5f..8b3f9c3 100644 --- a/libisofs/joliet.c +++ b/libisofs/joliet.c @@ -333,11 +333,12 @@ int joliet_create_mangled_name(uint16_t *dest, uint16_t *src, int digits, if (ext[0] != (uint16_t)0) { size_t extlen = ucslen(ext); - dest[pos++] = (uint16_t)0x2E00; /* '.' in big endian UCS */ + iso_msb((uint8_t *) (dest + pos), 0x002E, 2); /* '.' in UCS */ + pos++; ucsncpy(dest + pos, ext, extlen); pos += extlen; } - dest[pos] = (uint16_t)0; + iso_msb((uint8_t *) (dest + pos), 0, 2); free(ucsnumber); return ISO_SUCCESS; }