Menu

#179 wrong UI behaviour on size texts (VS2005)

closed-fixed
NSIS (71)
5
2008-11-20
2008-06-02
Anonymous
No

in Ui.c

line
wsprintf(
GetNSISString(g_tmp, prefix) + mystrlen(g_tmp),
has undefined behaviour under C specifications.

mystrlen could be called before GetNSISString, and this happens when NSIS is compiled under Visual Studio 2005 with full optimizations.

so I suggest the following change :
GetNSISString(g_tmp, prefix);
wsprintf(
g_tmp + mystrlen(g_tmp),

Wizou

Discussion

  • Amir Szekely

    Amir Szekely - 2008-06-12

    Logged In: YES
    user_id=584402
    Originator: NO

    That change adds quite a few bytes. I'll have to think of another fix for it, or if nothing else, I can #ifdef it.

     
  • Amir Szekely

    Amir Szekely - 2008-06-12
    • labels: --> NSIS
    • assigned_to: nobody --> kichik
    • summary: wrong UI behaviour on size texts --> wrong UI behaviour on size texts (VS2005)
     
  • Nobody/Anonymous

    Logged In: NO

    try this:
    char *tmp = GetNSISString(g_tmp, prefix);
    wsprintf(
    tmp + mystrlen(tmp),

     
  • Amir Szekely

    Amir Szekely - 2008-07-25

    Logged In: YES
    user_id=584402
    Originator: NO

    The first of many things I've already tried.

     
  • Amir Szekely

    Amir Szekely - 2008-11-20

    Ended up with a #if _MSC_VER for lack of a better solution.

     
  • Amir Szekely

    Amir Szekely - 2008-11-20
    • status: open --> closed-fixed
     

Log in to post a comment.