scummvm/common
Thierry Crozat 721db3eccb Fix an issue in String::ensureCapacity() when the string is shared. It could allocate two much memory as it was at least doubling the current capacity even when this one was sufficient.
It fixes a crash in GUI::Widget::cleanupHotkey() as the capacity of the string was doubled at each iteration once it was too long for the internal storage (only to add one character to the string). This ended up in a bad_alloc exception after a few iterations.

svn-id: r50050
2010-06-19 15:35:21 +00:00
..
algorithm.h Some tweaks and fixes for Common::Rational 2010-05-17 22:07:58 +00:00
archive.cpp Fix our DECLARE_SINGLETON macro to conform to the C++ specs. 2010-03-13 21:55:49 +00:00
archive.h Fixed bug in archive.cpp that caused at least one engine (SAGA) not to work 2009-10-03 20:12:44 +00:00
array.h Added operator== and != to Common::Array 2009-10-19 17:46:50 +00:00
config-file.cpp Fix spelling, cleanup 2010-06-15 12:33:20 +00:00
config-file.h cleanup 2009-02-16 01:04:19 +00:00
config-manager.cpp Print message when creating new INI; don't rewrite it directly after reading. 2010-04-13 10:08:17 +00:00
config-manager.h COMMON: Cleanup ConfigManager code 2010-03-29 20:31:23 +00:00
debug-channels.h Move DebugChannel related code to new header 2010-05-04 11:59:22 +00:00
debug.cpp Move DebugChannel related code to new header 2010-05-04 11:59:22 +00:00
debug.h Reduce indirect header dependencies further 2010-05-04 12:00:16 +00:00
endian.h Strip trailing spaces/tabs. 2010-01-25 01:39:44 +00:00
error.cpp Implement translation support for ScummVM GUI. 2010-06-15 10:44:51 +00:00
error.h Fix spelling, cleanup 2010-06-15 12:33:20 +00:00
EventDispatcher.cpp Fixed a bunch of cppcheck warnings. Mostly about checking if a pointer is null 2010-01-03 19:37:43 +00:00
EventRecorder.cpp COMMON: Move Common::RandomSource to common/random.* 2010-03-18 15:07:11 +00:00
EventRecorder.h COMMON: Move Common::RandomSource to common/random.* 2010-03-18 15:07:11 +00:00
events.h Typo. 2009-12-29 20:41:09 +00:00
file.cpp Hid hashed fileopening to debuglevel 8. 2010-06-15 10:19:06 +00:00
file.h Remove last traces of File::addDefaultDirectory 2010-02-09 22:37:13 +00:00
frac.h Switched Paula (Amiga MOD) code to use fixed point math instead of doubles (caveat: this only works for samples < 32k right now; if this ever turns out to be a problem, I can fix it, though) 2007-06-28 22:21:32 +00:00
fs.cpp Whitespace fix. 2010-04-13 16:13:48 +00:00
fs.h cleanup 2010-02-13 11:57:01 +00:00
func.h typo 2009-11-24 22:10:34 +00:00
hash-str.h Removed various uses of scumm_stricmp by the more readable String::equalsIgnoreCase and String:: compareToIgnoreCase 2008-08-27 20:41:28 +00:00
hashmap.cpp Fix erase() sometimes hiding other hash elements. 2009-06-13 21:07:05 +00:00
hashmap.h Restrict MIPSpro workaround to non-gcc compilers -- fixes compilation with gcc on irix. 2010-05-17 16:50:10 +00:00
iff_container.h Fix incorrectly placed doxygen comments; replace Common::ID2string by Common::tag2string 2009-11-24 22:08:34 +00:00
keyboard.h Update Common::KeyState comments 2010-02-23 22:50:28 +00:00
list_intern.h allowed list to be sorted with default comparator 2009-12-27 14:13:39 +00:00
list.h COMMON: Check for failed memory allocations; changed Common::String to use new/delete instead of malloc/free 2009-05-03 22:45:31 +00:00
macresman.cpp Have the MacResManager ignore resources with length 0. 2010-05-24 16:51:33 +00:00
macresman.h Make the MacResManager opening more robust to failed tries and plug its memory leaks 2010-05-20 13:46:18 +00:00
md5.cpp COMMON: Remove various variants of the md5_file / md5_file_string funcs; turned the (disabled) MD5 test code into a working unit test 2009-11-23 22:30:22 +00:00
md5.h COMMON: Remove various variants of the md5_file / md5_file_string funcs; turned the (disabled) MD5 test code into a working unit test 2009-11-23 22:30:22 +00:00
memorypool.cpp Some style fixes. 2010-03-20 13:18:47 +00:00
memorypool.h Some style fixes. 2010-03-20 13:18:47 +00:00
messages.cpp Commit updated common/messages.cpp too. 2010-06-17 19:15:23 +00:00
module.mk Do not rebuild common/messages.cpp automatically when a translation changes, but require the user to do "make update-translations". 2010-06-18 02:08:00 +00:00
mutex.cpp do not include common/debug.h from common/util.h 2009-01-30 05:25:17 +00:00
mutex.h Moved default implementations for various OSystem methods into a new class BaseBackend 2009-01-30 03:35:47 +00:00
noncopyable.h Formatting. 2008-05-03 23:02:05 +00:00
pack-end.h Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots 2007-05-30 21:56:52 +00:00
pack-start.h Updated legal headers in source files, based on what Pidgin (the IM client formerly knowns as Gaim) does; added new (incomplete) COPYRIGHT file; updated copyright dates in a few spots 2007-05-30 21:56:52 +00:00
ptr.h - Renamed SharedPtr<T>::Pointer to SharedPtr<T>::PointerType 2010-03-20 20:25:12 +00:00
queue.h COMMON: Added Common::List::front() and back() method (similar to std::list) 2009-04-27 11:11:42 +00:00
random.cpp COMMON: Move Common::RandomSource to common/random.* 2010-03-18 15:07:11 +00:00
random.h COMMON: Move Common::RandomSource to common/random.* 2010-03-18 15:07:11 +00:00
rational.cpp Minor formatting. 2010-05-17 22:17:42 +00:00
rational.h Get rid of Common::Rational::normalize and other redundant code 2010-05-17 22:08:40 +00:00
rect.h Patch #2973290: Semicolon cleanup 2010-03-22 20:28:08 +00:00
savefile.h Fix spelling, cleanup 2010-06-15 12:33:20 +00:00
scummsys.h Add Nintendo 64 port to trunk. 2009-12-30 21:11:38 +00:00
serializer.h Commit digitall's patch for bugs #2892510 and #2892510 with an additional comment. 2009-11-06 17:21:43 +00:00
singleton.h Fix our DECLARE_SINGLETON macro to conform to the C++ specs. 2010-03-13 21:55:49 +00:00
stack.h Strip trailing whitespaces in the whole code base. 2009-05-24 15:17:42 +00:00
str-array.h COMMON: Get rid of Common::StringList 2010-03-18 15:54:40 +00:00
str.cpp Fix an issue in String::ensureCapacity() when the string is shared. It could allocate two much memory as it was at least doubling the current capacity even when this one was sufficient. 2010-06-19 15:35:21 +00:00
str.h Typo fixes. 2010-05-30 13:41:40 +00:00
stream.cpp Fix spelling, cleanup 2010-06-15 12:33:20 +00:00
stream.h Added seek() method to MemoryWriteStreamDynamic. 2010-06-15 10:34:14 +00:00
system.cpp Moved default implementations for various OSystem methods into a new class BaseBackend 2009-01-30 03:35:47 +00:00
system.h Fix spelling, cleanup 2010-06-15 12:33:20 +00:00
textconsole.cpp Add Android backend from patch #2603856 2010-06-06 09:34:36 +00:00
textconsole.h COMMON: Replace NORETURN by NORETURN_PRE & NORETURN_POST 2009-11-29 21:56:10 +00:00
timer.h Clarify timer API. 2009-02-27 22:19:33 +00:00
tokenizer.cpp Move StringTokenizer to its own files (tokenizer.h/tokenizer.cpp). 2010-03-20 12:56:56 +00:00
tokenizer.h Move StringTokenizer to its own files (tokenizer.h/tokenizer.cpp). 2010-03-20 12:56:56 +00:00
translation.cpp Properly provide stub implementations for all TranslationManager methods when USE_TRANSLATIONS is not defined. 2010-06-18 02:25:33 +00:00
translation.h Use USE_TRANSLATION, USE_DETECTLANG and USE_TERMCONV instead of (ENABLE_)TRANSLATION, DETECTLANG and TERMCONV. 2010-06-15 19:20:58 +00:00
types.h Move DisposeAfterUse::Flag from Common to global namespace, and into a new header common/types.h 2010-01-08 22:07:35 +00:00
unarj.cpp Replace various strncpy usages by strlcpy. 2010-05-05 17:54:12 +00:00
unarj.h Hide ZipArchive implementation, only expose it via factory functions: makeZipArchive() 2010-02-13 11:56:30 +00:00
unzip.cpp Fix file length of zip file members inside ZipArchive (thanks to fuzzie for reporting). 2010-05-30 12:44:59 +00:00
unzip.h Hide ZipArchive implementation, only expose it via factory functions: makeZipArchive() 2010-02-13 11:56:30 +00:00
util.cpp GUI: Implemented Languages as GUI options. 2010-06-15 10:57:28 +00:00
util.h GUI: Implemented Languages as GUI options. 2010-06-15 10:57:28 +00:00
xmlparser.cpp Fix virtual-keyboard not changing size, when the user changes the scaler while it is not visible. 2010-01-25 02:08:28 +00:00
xmlparser.h cleanup 2009-10-20 19:52:18 +00:00
zlib.cpp Fix code formatting (esp. 'if(' -> 'if (' etc., but also indention and other things) 2009-09-30 16:16:53 +00:00
zlib.h Fixed indentation and removed whitespaces at the end of line 2008-12-22 11:22:15 +00:00