static int
read_name (OTF *otf, OTF_Stream *stream, OTF_NameRecord *rec)
{
- char *errfmt = "nameID (%d)";
+ char errfmt[256];
int errret = -1;
OTF_StreamState state;
int ucs = 0;
int ascii = 0;
int i;
+ sprintf (errfmt, "nameID (%d)%%s", rec->nameID);
if (rec->platformID == 0)
ucs = (rec->encodingID <= 3) ? 2 : 4;
else if (rec->platformID == 1 && rec->encodingID == 0)
: rec->encodingID == 10 ? 4
: 0);
- OTF_MALLOC (rec->name, rec->length + 1, (void *) rec->nameID);
+ OTF_MALLOC (rec->name, rec->length + 1, "");
SAVE_STREAM (stream, state);
SEEK_STREAM (stream, stream->pos + rec->offset);
READ_BYTES (stream, rec->name, rec->length);