InfraArcana/ia — pull request #4 by blinkkin (2014-01-16 14:21:12+00:00)
Title: Bugfix: unsigned int cannot hold value of npos, which can be negative.

When opening Options, IA just crashes:

```
terminate called after throwing an instance of 'std::out_of_range'
what(): basic_string::replace
Aborted (core dumped)
```

This is related to commit 5522e27050 "Removed scaling, added 16x24 DOS font".

According to http://www.cplusplus.com/reference/string/string/npos/
> This constant is defined with a value of -1, which because size_t is an unsigned integral type, it is the largest possible representable value for this type.

This is asking for troubles:

```
g++ -c -std=c++11 -Wall -Wextra -I/usr/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -O0 -g -I include -I include/debugModeIncl src/TextFormatting.cpp -o src/TextFormatting.o
src/TextFormatting.cpp: In function ‘void TextFormatting::replaceAll(const string&, const string&, const string&, std::string&)’:
src/TextFormatting.cpp:89:69: warning: comparison is always true due to limited range of data type [-Wtype-limits]
while((startPos = resultRef.find(from, startPos)) != std::string::npos) {
^
```