VOGONS

Common searches


First post, by realnc

User metadata
Rank Oldbie
Rank
Oldbie

MEMORY::MEMORY(Section*) has a bug where it uses the throwing 'new' but then checks for null, which will actually never detect an allocation failure because an exception will be thrown. The attached patch fixes it.

Attachments

Reply 1 of 3, by Dominus

User metadata
Rank DOSBox Moderator
Rank
DOSBox Moderator

Moved to patches!

Windows 3.1x guide for DOSBox
60 seconds guide to DOSBox
DOSBox SVN snapshot for macOS (10.4-11.x ppc/intel 32/64bit) notarized for gatekeeper

Reply 3 of 3, by realnc

User metadata
Rank Oldbie
Rank
Oldbie
Qbix wrote on 2020-05-05, 10:25:

Not sure about which C++ version this is for.
It might be for a relative new one.

No, it worked like that since the beginning. This is the C++ standard document from 2005 for example:

http://www.open-std.org/jtc1/sc22/wg21/docs/p … /2005/n1905.pdf

cppreference.com also always marks things as "C++11/14/17/20" for things that were added later to the language, and this one doesn't have such tag:

https://en.cppreference.com/w/cpp/memory/new/nothrow