[comp.text.tex] a bug in fig-fs

skdutta@cs.tamu.edu (Saumen K Dutta) (03/21/90)

I am using fig-fs which a pd software for inserting line drawings in LateX 
documents. It is a modified version fig written by:
 Supoj Sutanthavibul (supoj@sally.UTEXAS.EDU)
Here one of the user of our site has discovered a bug. After drawing the figure
on the canvas, when the user wants to save it, fig-fs prompts for
"Save on file :" and waits for the input. Instead of putting any file name
if the user now choose to press <enter> he comes out with a file stored in his
directory named "Save on file :" (i.e. the prompt string)!!.
	After going through the code (which is undocumented), I realised that
it is
is due to some uninitialised pointer to the file name. I just found a quick
solution 
this( which may be considered to be quite dirty by the designer). What I did
was
to replace line 42 from:
    42          if ((nl->count == 1)) {
to:
    42          if ((nl->count == 1)&&(strcmp(nl->names[0],"Save in file :")))
{

this solves the problem. 
	I would like to have a cleaner solution from the designer of the
software or
if somebody has already fixed it(I don't think it is worth reinventing the
wheel).

Thanks for any anticipated pointer

Note: Standard disclaimer apply

     _                                   ||Internet: skdutta@cssun.tamu.edu  
    (   /_     _ /   --/-/- _            ||Bitnet : skd8107@tamvenus.bitnet 
   __)_/(_____(_/_(_/_(_(__(_/_______    ||Uucp : uunet!cssun.tamu.edu!skdutta
                                 ..      ||Hollernet: (409) 846-8803