summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/chardump.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-10-20 15:52:21 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2006-10-20 15:52:21 +0000
commitc536a7c21df9c512e66c60182bba18c610b7f7a1 (patch)
treefa7f52ed96ddd9345c4608123e7bab1d7b747621 /crawl-ref/source/chardump.cc
parentfd2efa229f36d4d1bb2bab03586cf858f6c6cb17 (diff)
downloadcrawl-ref-c536a7c21df9c512e66c60182bba18c610b7f7a1.tar.gz
crawl-ref-c536a7c21df9c512e66c60182bba18c610b7f7a1.zip
Revamp of how file names are created.
SHORT_FILE_NAMES should now work properly. Note that this changes the behaviour from 0.1.2! So Crawl Windows saves should now work, but Stone Soup 0.1.2 saves might not (if the character name is > 6 chars.) Testing is requested. Almost everything is handled in strings now so we can get rid of some file-name-length constants. Also changed lots of '\0' to 0 (hope I'm not stepping on anyone's toes.) Windows still sets SHORT_FILE_NAMES, though I can't imagine why. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@255 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/chardump.cc')
-rw-r--r--crawl-ref/source/chardump.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/crawl-ref/source/chardump.cc b/crawl-ref/source/chardump.cc
index bb35ef943b..ef536b9b4c 100644
--- a/crawl-ref/source/chardump.cc
+++ b/crawl-ref/source/chardump.cc
@@ -508,21 +508,21 @@ static void dump_stats2( std::string & text, bool calc_unid)
for (int i = 0; i < 24; i++)
{
ptr_n = &buffer[i][0];
- if (buffer[i+24][0] == '\0' && buffer[i+24*2][0] == '\0')
+ if (buffer[i+24][0] == 0 && buffer[i+24*2][0] == 0)
snprintf(&str_pass[0], 45, "%s", ptr_n);
else
snprintf(&str_pass[0], 45, "%-32s", ptr_n);
text += str_pass;
ptr_n = &buffer[i+24][0];
- if (buffer[i+24*2][0] == '\0')
+ if (buffer[i+24*2][0] == 0)
snprintf(&str_pass[0], 45, "%s", ptr_n);
else
snprintf(&str_pass[0], 45, "%-20s", ptr_n);
text += str_pass;
ptr_n = &buffer[i+24*2][0];
- if (buffer[i+24*2][0] != '\0')
+ if (buffer[i+24*2][0] != 0)
{
snprintf(&str_pass[0], 45, "%s", ptr_n);
text += str_pass;