fix bug printing application id
authorJosh Coalson <jcoalson@users.sourceforce.net>
Sat, 4 May 2002 17:46:37 +0000 (17:46 +0000)
committerJosh Coalson <jcoalson@users.sourceforce.net>
Sat, 4 May 2002 17:46:37 +0000 (17:46 +0000)
src/metaflac/main.c

index 372be52..98363b3 100644 (file)
@@ -27,6 +27,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+/* we only use some typedefs, #defines, and enums from here: */
 #include "FLAC/all.h"
 
 static const char *sync_string_ = "fLaC"; /* DUPLICATE:FLAC__STREAM_SYNC_STRING */
 #include "FLAC/all.h"
 
 static const char *sync_string_ = "fLaC"; /* DUPLICATE:FLAC__STREAM_SYNC_STRING */
@@ -36,7 +37,7 @@ static const char *metadata_type_string_[] = { /* DUPLICATE:FLAC__MetaDataTypeSt
        "APPLICATION",
        "SEEKTABLE"
 };
        "APPLICATION",
        "SEEKTABLE"
 };
-static const unsigned SEEKPOINT_LEN_ = 18; /* DUPLICATE:FLAC__STREAM_METADATA_SEEKPOINT_LEN */
+static const unsigned SEEKPOINT_LEN_ = 18; /* DUPLICATE:FLAC__STREAM_METADATA_SEEKPOINT_LENGTH */
 
 static int usage(const char *message, ...);
 static FLAC__bool list(FILE *f, FLAC__bool verbose);
 
 static int usage(const char *message, ...);
 static FLAC__bool list(FILE *f, FLAC__bool verbose);
@@ -233,7 +234,7 @@ FLAC__bool list(FILE *f, FLAC__bool verbose)
                                }
                                break;
                        case FLAC__METADATA_TYPE_APPLICATION:
                                }
                                break;
                        case FLAC__METADATA_TYPE_APPLICATION:
-                               memcpy(buf, metadata.data.application.id, 4);
+                               memcpy(metadata.data.application.id, buf, 4);
                                metadata.data.application.data = buf+4;
                                break;
                        case FLAC__METADATA_TYPE_SEEKTABLE:
                                metadata.data.application.data = buf+4;
                                break;
                        case FLAC__METADATA_TYPE_SEEKTABLE: