]> git.tdb.fi Git - libs/gui.git/commitdiff
Fix BMP loader signature check
authorMikko Rasa <tdb@tdb.fi>
Sun, 31 Jan 2021 15:18:37 +0000 (17:18 +0200)
committerMikko Rasa <tdb@tdb.fi>
Sun, 31 Jan 2021 15:18:37 +0000 (17:18 +0200)
source/graphics/bmploader.cpp

index 086648bfe7b3eb26bb4f079ad95281a1b151fc9d..fa23182883996164a73611c17b1416893aef0a62 100644 (file)
@@ -38,7 +38,7 @@ BmpLoader::BmpLoader(IO::Base &i, unsigned sb):
 
 bool BmpLoader::detect(const std::string &sig)
 {
-       static const char bmp_sig[] = "BM";
+       static const char bmp_sig[] = { 'B', 'M' };
        if(sig.size()<sizeof(bmp_sig))
                return false;
        return !sig.compare(0, sizeof(bmp_sig), bmp_sig, sizeof(bmp_sig));