From 8f2f6a5e2074a5da684f9f1a5f5e8f3c51a82b76 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Mon, 6 Feb 2017 13:34:23 +1100 Subject: More or less completed main procedure, fixed some bugs --- src/csv.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/csv.adb') 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; -- cgit