• Reimar Döffinger's avatar
    Make ff_win32_open more robust. · c3c3bc7f
    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 avatarReimar Döffinger <Reimar.Doeffinger@gmx.de>
    c3c3bc7f
os_support.c 10.1 KB