summaryrefslogtreecommitdiff
path: root/src/csv.adb
diff options
context:
space:
mode:
Diffstat (limited to 'src/csv.adb')
-rw-r--r--src/csv.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/csv.adb b/src/csv.adb
index eab633b..1b8fd7f 100644
--- a/src/csv.adb
+++ b/src/csv.adb
@@ -28,7 +28,11 @@ package body CSV is
exit when SU.Length (This_In) > 0 and then SU.Element (This_In, 1) = Quote;
end loop;
Output := Result;
- Remaining := SU.Tail (This_In, SU.Length (This_In) - 1);
+ if SU.Length (This_In) > 0 then
+ Remaining := SU.Tail (This_In, SU.Length (This_In) - 1);
+ else
+ Remaining := SU.To_Unbounded_String (0);
+ end if;
return True;
else
return False;