• Reimar Döffinger's avatar
    win32: Make ff_win32_open more robust · ad040259
    Reimar Döffinger authored
    - Make MultiByteToWideChar fail when it encounters invalid encoding.
      Without this, invalid characters might just be skipped
    - When MultiByteToWideChar fails, assume the file name is in CP_ACP
      and open it via normal open function, even when the file will be
      written
    - When malloc fails return error instead of crashing
    Signed-off-by: 's avatarMartin Storsjö <martin@martin.st>
    ad040259
os_support.c 10.2 KB