aboutsummaryrefslogtreecommitdiff
path: root/libcpp/charset.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcpp/charset.c')
-rw-r--r--libcpp/charset.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/libcpp/charset.c b/libcpp/charset.c
index 6a92ade..e77270a 100644
--- a/libcpp/charset.c
+++ b/libcpp/charset.c
@@ -1538,9 +1538,9 @@ cpp_interpret_string_1 (cpp_reader *pfile, const cpp_string *from, size_t count,
tbuf.len = 0;
}
+ cpp_string_location_reader *loc_reader = NULL;
for (i = 0; i < count; i++)
{
- cpp_string_location_reader *loc_reader = NULL;
if (loc_readers)
loc_reader = &loc_readers[i];
@@ -1652,6 +1652,13 @@ cpp_interpret_string_1 (cpp_reader *pfile, const cpp_string *from, size_t count,
to->text = tbuf.text;
to->len = tbuf.len;
}
+ /* Use the location of the trailing quote as the location of the
+ NUL-terminator. */
+ if (loc_reader)
+ {
+ source_range range = loc_reader->get_next ();
+ out->add_range (range);
+ }
return true;