Ticket #53433: wine-2.0-10.6.diff

File wine-2.0-10.6.diff, 1019 bytes (added by chrisjogorman, 8 years ago)
  • wine-2.0/dlls/d3d10/effect.c

    old new  
    244244    {D3D10_SVT_SAMPLER,      sizeof(default_sampler_desc),       &default_sampler_desc      },
    245245};
    246246
     247size_t strnlen(const char *str, size_t max)
     248{
     249    const char *end = memchr (str, 0, max);
     250    return end ? (size_t)(end - str) : max;
     251}
     252
    247253static BOOL fx10_get_string(const char *data, size_t data_size, DWORD offset, const char **s, size_t *l)
    248254{
    249255    size_t len, max_len;
  • wine-2.0/dlls/d3d11/shader.c

    old new  
    143143    return hr;
    144144}
    145145
     146// Use this if strnlen is missing.
     147size_t strnlen(const char *str, size_t max)
     148{
     149    const char *end = memchr (str, 0, max);
     150    return end ? (size_t)(end - str) : max;
     151}
     152
    146153static const char *shader_get_string(const char *data, size_t data_size, DWORD offset)
    147154{
    148155    size_t len, max_len;