summaryrefslogtreecommitdiff
path: root/colm
diff options
context:
space:
mode:
Diffstat (limited to 'colm')
-rw-r--r--colm/string.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/colm/string.c b/colm/string.c
index 21c3aac4..5b5e39e2 100644
--- a/colm/string.c
+++ b/colm/string.c
@@ -44,6 +44,14 @@ Head *stringCopy( Program *prg, Head *head )
result = stringAllocFull( prg, head->data, head->length );
else
result = stringAllocPointer( prg, head->data, head->length );
+
+ if ( head->location != 0 ) {
+ result->location = locationAllocate( prg );
+ result->location->file = head->location->file;
+ result->location->line = head->location->line;
+ result->location->column = head->location->column;
+ result->location->byte = head->location->byte;
+ }
}
return result;
}