Sigil-Ebook / flightcrew

Automatically exported from code.google.com/p/flightcrew
GNU General Public License v3.0
33 stars 11 forks source link

src/FlightCrew/Misc/CustomAssert.cpp:100: use of out of scope variable #51

Closed dcb314 closed 12 months ago

dcb314 commented 5 years ago

FlightCrew-0.9.1/src/FlightCrew/Misc/CustomAssert.cpp:100]: (error) Using pointer to local variable 'messageBuffer' that is out of scope.

Source code is

    if (msg != NULL)
    {
            char messageBuffer[1024];
            {
                    va_list args;
                    va_start(args, msg);

        #if defined(_MSC_VER)
                    vsnprintf_s(messageBuffer, 1024, 1024, msg, args);
        #else
        vsnprintf(messageBuffer, 1024, msg, args);
        #endif

                    va_end(args);
            }

            message = messageBuffer;
    }

    return GetAssertHandlerInstance()(condition, message, file, line);
kevinhendricks commented 12 months ago

Closing as this repository is being archived.