fb39ca4 / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

segmentation fault into the gest function when using the BUILTIN_MINI_STDLIB define #110

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The gets.c script raise a segmentation fault (one cygwine) when i use the 
BUILTIN_MINI_STDLIB  flag.

In my OS20 implémentation i modify the function gets in clibrary.c at line 
323. And now it'is work.

/* get a line of input. protected from buffer overrun */
void LibGets(struct ParseState *Parser, struct Value *ReturnValue, struct Value 
**Param, int NumArgs)
{

    char *Result;

    Result = PlatformGetLine((char *)Param[0]->Val->Pointer, Param[1]->Val->Integer,NULL);
    /*if (Result == NULL)
        return;*/

 /*   ReturnValue->Val->NativePointer = Result;*/
}

Thanks
Olivier

Original issue reported on code.google.com by olivier....@smardtv.com on 23 Aug 2010 at 6:58

Attachments:

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r513.

Original comment by zik.sale...@gmail.com on 12 Feb 2011 at 3:14