Fix initialization of WriterFrontend names.

The string representation of the writer looked up based on the stream's
enum value instead of the writer's enum value, often causing this
component of the name to be "(null)" since a null pointer was returned
from the lookup.
This commit is contained in:
Jon Siwek 2012-07-24 11:18:32 -05:00
parent 3f21764d00
commit 3f4b4c88a6

View file

@ -112,7 +112,7 @@ WriterFrontend::WriterFrontend(const WriterBackend::WriterInfo& arg_info, EnumVa
write_buffer_pos = 0; write_buffer_pos = 0;
info = new WriterBackend::WriterInfo(arg_info); info = new WriterBackend::WriterInfo(arg_info);
const char* w = arg_writer->Type()->AsEnumType()->Lookup(arg_stream->InternalInt()); const char* w = arg_writer->Type()->AsEnumType()->Lookup(arg_writer->InternalInt());
name = copy_string(fmt("%s/%s", arg_info.path, w)); name = copy_string(fmt("%s/%s", arg_info.path, w));
if ( local ) if ( local )