SLICE segfaults

Q&A's, tips, howto's
Locked
pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

SLICE segfaults

Post by pjot »

Hi Lutz,

Using the command "slice" in an erroneous way delivers a segfault. Might it not be more user-friendly to generate a newLISP error so it is clear where the problem comes from? For example, this code:

---------------------------------------
#!/usr/bin/newlisp

(set 'var "This is newLISP")
(println(slice var 1 -1))
---------------------------------------

uses "slice" in a way that is applicable for lists, not for strings. If I run it however, I receive a segfault (Slackware 9.1).

Regards

Peter.

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post by Lutz »

thanks, this is fixed in 7.5.6

Lutz

Locked