Couple of minor tweaks
authorErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 29 Dec 2015 10:17:44 +0000 (21:17 +1100)
committerErik de Castro Lopo <erikd@mega-nerd.com>
Tue, 29 Dec 2015 18:10:58 +0000 (05:10 +1100)
Patch-from: lvqcl <lvqcl.mail@gmail.com>

include/share/alloc.h
src/flac/foreign_metadata.c

index 3b70749..d197891 100644 (file)
@@ -52,7 +52,7 @@
 # ifndef SIZE_T_MAX
 #  ifdef _MSC_VER
 #   ifdef _WIN64
-#    define SIZE_T_MAX 0xffffffffffffffffui64
+#    define SIZE_T_MAX FLAC__U64L(0xffffffffffffffff)
 #   else
 #    define SIZE_T_MAX 0xffffffff
 #   endif
index d01f466..2fb2f1d 100644 (file)
@@ -198,7 +198,7 @@ static FLAC__bool read_from_wave_(foreign_metadata_t *fm, FILE *f, const char **
        }
        if(!append_block_(fm, offset, 12, error))
                return false;
-       if(!fm->is_rf64 || unpack32le_(buffer+4) != 0xffffffffu) {
+       if(!fm->is_rf64 || unpack32le_(buffer+4) != 0xffffffff) {
                eof_offset = (FLAC__off_t)8 + (FLAC__off_t)unpack32le_(buffer+4);
                if(eof_offset & 1) /* fix odd RIFF size */
                        eof_offset++;
@@ -293,7 +293,7 @@ static FLAC__bool read_from_wave_(foreign_metadata_t *fm, FILE *f, const char **
                        }
                }
                else { /* skip to next chunk */
-                       if(fm->is_rf64 && !memcmp(buffer, "data", 4) && unpack32le_(buffer+4) == 0xffffffffu) {
+                       if(fm->is_rf64 && !memcmp(buffer, "data", 4) && unpack32le_(buffer+4) == 0xffffffff) {
                                if(fseeko(f, ds64_data_size, SEEK_CUR) < 0) {
                                        if(error) *error = "invalid RF64 file: seek error (r10)";
                                        return false;