diff options
Diffstat (limited to 'vowpalwabbit/parse_example.cc')
-rw-r--r-- | vowpalwabbit/parse_example.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vowpalwabbit/parse_example.cc b/vowpalwabbit/parse_example.cc index 941f0366..63bcb227 100644 --- a/vowpalwabbit/parse_example.cc +++ b/vowpalwabbit/parse_example.cc @@ -182,7 +182,7 @@ public: for (feature*f = feats->begin; f != feats->end; ++f) { uint32_t id = f->weight_index; size_t len = 2 + (feature_name.end-feature_name.begin) + 1 + (size_t)ceil(log10(id)) + 1; - char* str = (char*)calloc(len, sizeof(char)); + char* str = calloc_or_die<char>(len); str[0] = index; str[1] = '_'; char *c = str+2; |