From d22dd3f6e621f9b774bd04ac23c05cac1291fc88 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 21 Aug 2000 08:54:19 +0000 Subject: No need any more to NUL terminate keys. --- src/key-list.cc | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/key-list.cc b/src/key-list.cc index 157458c..697e784 100644 --- a/src/key-list.cc +++ b/src/key-list.cc @@ -213,7 +213,7 @@ Key_List::set_output_types (void) /* Extracts a key from an input line and creates a new List_Node for it. */ static List_Node * -parse_line (char *line, const char *delimiters) +parse_line (const char *line, const char *delimiters) { if (*line == '"') { @@ -342,12 +342,8 @@ parse_line (char *line, const char *delimiters) if (line[len] == '\0') rest = ""; else - { - /* Quick hack to separate the key from the rest, killing the first - delimiter. */ - line[len] = '\0'; - rest = &line[len + 1]; - } + /* Skip the first delimiter. */ + rest = &line[len + 1]; return new List_Node (line, len, option[TYPE] ? rest : ""); } } -- cgit v1.2.1