Browse Source

Correctly set TagOpenData's default values.

tags/v0.3
Ben Kurtovic 11 years ago
parent
commit
30c3f27b0e
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      mwparserfromhell/parser/tokenizer.c

+ 2
- 0
mwparserfromhell/parser/tokenizer.c View File

@@ -1261,6 +1261,7 @@ Tokenizer_really_parse_tag(Tokenizer* self)
PyErr_NoMemory(); PyErr_NoMemory();
return NULL; return NULL;
} }
data->context = TAG_NAME;
data->pad_first = Textbuffer_new(); data->pad_first = Textbuffer_new();
data->pad_before_eq = Textbuffer_new(); data->pad_before_eq = Textbuffer_new();
data->pad_after_eq = Textbuffer_new(); data->pad_after_eq = Textbuffer_new();
@@ -1268,6 +1269,7 @@ Tokenizer_really_parse_tag(Tokenizer* self)
free(data); free(data);
return NULL; return NULL;
} }
data->reset = 0;
if (Tokenizer_push(self, LC_TAG_OPEN)) { if (Tokenizer_push(self, LC_TAG_OPEN)) {
free(data); free(data);
return NULL; return NULL;


Loading…
Cancel
Save