From: Andy Wingo Subject: Re: bug#26013: (srfi srfi-37) chokes on empty string parameter Date: Wed, 19 Apr 2017 17:13:25 +0200 > On Tue 07 Mar 2017 16:34, Thomas Danckaert > writes: > >> It looks like Guile's srfi-37 implementation doesn't process empty >> string arguments correctly. >> [...] >> In srfi/srfi-37.scm: >> 220: 1 [next-arg] >> In unknown file: >> ?: 0 [string-ref "" 0] >> >> ERROR: In procedure string-ref: >> ERROR: Value out of range: 0 > > Sounds like the right diagnosis to me. Want to submit a patch? :) Well, let me try :) I don't fully understand the code in srfi-37.scm, but I think the fix can be as simple as the attached patch (i.e. first check if the argument is empty, otherwise check if it starts with \#-). I have tried to follow the existing indentation convention, as far as I understand it (a mix of tabs and spaces). Thomas