From d4ee8720769a82edf33a4d49b2cc7dc8d30ebdce Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Thu, 4 Oct 2012 17:01:42 -0700 Subject: [PATCH] Properly construct dynamic field names --- src/FieldNames.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/FieldNames.cpp b/src/FieldNames.cpp index 612d250c97..66fc525585 100644 --- a/src/FieldNames.cpp +++ b/src/FieldNames.cpp @@ -7,6 +7,7 @@ #include #include +#include "utils.h" // These must stay at the top of this file std::map SField::codeToField; @@ -52,7 +53,8 @@ SField::ref SField::getField(int code) return sfInvalid; } - return *(new SField(code, static_cast(type), field, NULL)); + std::string dynName = lexical_cast_i(type) + "/" + lexical_cast_i(field); + return *(new SField(code, static_cast(type), field, dynName.c_str())); } int SField::compare(SField::ref f1, SField::ref f2)