Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/surface.c:
- hr = IWICStream_InitializeFromMemory(wic_stream, (BYTE *)src_image, src_image_size);
- if (FAILED(hr))
goto exit;
- hr = IWICImagingFactory_CreateDecoderFromStream(wic_factory, (IStream *)wic_stream, NULL, 0, &bitmap_decoder);
- if (FAILED(hr))
- {
if ((src_image_size >= 2) && (!strncmp(src_image, "P3", 2) || !strncmp(src_image, "P6", 2)))
FIXME("File type PPM is not supported yet.\n");
else if ((src_image_size >= 10) && !strncmp(src_image, "#?RADIANCE", 10))
FIXME("File type HDR is not supported yet.\n");
else if ((src_image_size >= 2) && (!strncmp(src_image, "PF", 2) || !strncmp(src_image, "Pf", 2)))
FIXME("File type PFM is not supported yet.\n");
goto exit;
- }
This is just moving old code around but I think we can make some improvements while at it. Here it looks like we can replace those `strncmp()` uses with `memcmp()`.