Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/fs/udf/udf_osta.c

    r5c702a8 rb2906c0  
    5151#include "udf_osta.h"
    5252#include "udf_cksum.h"
    53 
    54 /** Calculate length of UTF-16 string
    55  *
    56  * FIXME: This is wrong! UTF-16 is not a fixed-width encoding,
    57  *        it is a variable-width encoding (mind the surrogate
    58  *        pairs).
    59  *
    60  */
    61 static size_t utf16_length(uint16_t *string) {
    62         size_t len = 0;
    63        
    64         while (*string++ != 0)
    65                 len++;
    66        
    67         return len;
    68 }
    6953
    7054/** Illegal UNIX characters are NULL and slash.
     
    296280                ucode_chars =
    297281                    udf_uncompress_unicode(len, (uint8_t *) id, raw_name, MAX_BUF);
    298                 ucode_chars = min(ucode_chars, utf16_length(raw_name));
     282                ucode_chars = min(ucode_chars, utf16_wsize(raw_name));
    299283                nice_uchars =
    300284                    udf_translate_name(unix_name, raw_name, ucode_chars);
Note: See TracChangeset for help on using the changeset viewer.