Fixed a bug in print_description().
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1351 c06c8d41-db1a-0410-9941-cceddc491573
CNBEMJYK6RATHVHUXN5RFKJCRHZJUCPOGHKWPVD4QLVNDNLDDCFQC
if (nextLine >= currentPos && nextLine < currentPos + lineWidth)
{
cprintf("%s",
(d.substr(currentPos, nextLine - currentPos)).c_str());
currentPos = nextLine + 1;
continue;
}
// Handle real line breaks. No substitutions necessary, just update
// the counts.
nextLine = d.find('\n', currentPos);
if (nextLine >= currentPos && nextLine < currentPos + lineWidth) {
cprintf("%s", (d.substr(currentPos, nextLine - currentPos)).c_str());
currentPos = nextLine +1;
continue;
}
if (nextLine == std::string::npos)
nlSearch = false; // there are no newlines, don't search again.
if (nextLine >= currentPos && nextLine < currentPos + lineWidth)
{
cprintf("%s", (d.substr(currentPos, nextLine-currentPos)).c_str());
currentPos = nextLine + 1;
continue;
// Handle real line breaks. No substitutions necessary, just update
// the counts.
nextLine = d.find('\n', currentPos);
if (nextLine >= currentPos && nextLine < currentPos + lineWidth)
{
cprintf("%s", (d.substr(currentPos, nextLine-currentPos)).c_str());
currentPos = nextLine +1;
continue;
}
switch ( get_equip_race(item) )
{
case ISFLAG_DWARVEN:
description +=
"$It is more effective in conjunction with dwarven launchers.";
break;
case ISFLAG_ELVEN:
description +=
"$It is more effective in conjunction with elven launchers.";
break;
case ISFLAG_ORCISH:
description +=
"$It is more effective in conjunction with orcish launchers.";
break;
}