ApeTag: use std::string for temporary allocation
This commit is contained in:
@@ -24,7 +24,7 @@
|
|||||||
#include "TagTable.hxx"
|
#include "TagTable.hxx"
|
||||||
#include "TagHandler.hxx"
|
#include "TagHandler.hxx"
|
||||||
|
|
||||||
#include <glib.h>
|
#include <string>
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
@@ -76,10 +76,9 @@ tag_ape_import_item(unsigned long flags,
|
|||||||
|
|
||||||
value = n + 1;
|
value = n + 1;
|
||||||
} else {
|
} else {
|
||||||
char *p = g_strndup(value, end - value);
|
const std::string value2(value, end);
|
||||||
tag_handler_invoke_tag(handler, handler_ctx,
|
tag_handler_invoke_tag(handler, handler_ctx,
|
||||||
type, p);
|
type, value2.c_str());
|
||||||
g_free(p);
|
|
||||||
recognized = true;
|
recognized = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user