diff options
-rw-r--r-- | debbugs/operations.scm | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/debbugs/operations.scm b/debbugs/operations.scm index e459a9d..d744ac4 100644 --- a/debbugs/operations.scm +++ b/debbugs/operations.scm @@ -151,8 +151,11 @@ bug identified by BUG-ID." (define (drop-lines str k) (if (zero? k) str - (drop-lines (substring str (1+ (string-index str #\newline))) - (1- k)))) + (or (and=> (string-index str #\newline) + (lambda (index) + (drop-lines (substring str (1+ index)) + (1- k)))) + str))) (let ((msg-nums ((sxpath '(// urn:Debbugs/SOAP:get_bug_logResponse http://schemas.xmlsoap.org/soap/encoding/:Array |