Menu

Hi, I met a strange problem with mgl_parse_text in mathgl v2.1.3

Anonymous
2013-12-21
2014-02-10
  • Anonymous

    Anonymous - 2013-12-21

    If script uses win32-style newline character \r\n, and there exists empty line, mgl_parse_text will cause crash. For example:

    mgl_parse_text( gr, parser, "box\r\n\r\naxis" ); // crash
    mgl_parse_text( gr, parser, "box\n\naxis" ); // OK with Linux-style newline character
    mgl_parse_text( gr, parser, "box\r\naxis" ); // OK without empty line

    My compiler is Visual Studio 2003.

    BTW: The problem does not exist in mathgl v2.0.3

     
    • Alexey Balakin

      Alexey Balakin - 2013-12-23

      Hi, I don't see a bug. Which version do you use? and under which OS?

       
      • Anonymous

        Anonymous - 2013-12-25

        I use MathGLv2.1.3.
        I found the bug under WinXP SP3 CHS and Win2000 SP4 CHS.
        I use compiler option - /MDd .
        I just test following code ,the bug still exists.
        HMPR parser = mgl_create_parser();
        mgl_parse_text( gr, parser, "box\r\n\r\naxis" );
        mgl_delete_parser(parser);

         
  • Alexey Balakin

    Alexey Balakin - 2013-12-29

    Can you test it with latest version (i.e. v.2.2)? Since you are using v.2.*.

     
  • Anonymous

    Anonymous - 2013-12-31

    Thanks for your replay.
    I have tested the same code with v2.2, it's OK.
    This time, the tested library file is created from source code with vs2008.

     

Anonymous
Anonymous

Add attachments
Cancel