Ignore:
Timestamp:
Dec 18, 2016, 12:19:56 AM (7 years ago)
Author:
Bruno Cornec
Message:
  • Fix mr_popup_and_get_string which was using a freed string by newtFormDestroy. String is now duplicated.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/newt-specific.c

    r3614 r3618  
    768768    b_res = newtRunForm(myForm);
    769769
     770    if (b_res != b_2) {
     771        /*  We need to copy the value as newtFormDestroy will clear entry_value */
     772        mr_asprintf(out, "%s", entry_value);
     773    }
    770774    newtPopHelpLine();
    771775    newtFormDestroy(myForm);
     
    773777    mr_free(blurb);
    774778
    775     if (b_res != b_2) {
    776         out = entry_value;
    777     }
    778779    return(out);
    779780}
Note: See TracChangeset for help on using the changeset viewer.