diff options
author | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:56 +0100 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2015-02-23 09:11:56 +0100 |
commit | 61e8cfc1d553b2bc0cce6b0dd56b03f51f187423 (patch) | |
tree | 4988afbe6ad84804444d0dc3151d300e22d1a80e /src/modules.cc | |
parent | b1f5178bdabafde20eb65df6256b53dc5968b2e2 (diff) |
Clean up warnings about signed/unsigned comparisons
Diffstat (limited to 'src/modules.cc')
-rw-r--r-- | src/modules.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/modules.cc b/src/modules.cc index a2e26fe8..842d6c41 100644 --- a/src/modules.cc +++ b/src/modules.cc @@ -377,9 +377,9 @@ static bool_ dleft(byte c, cptr str, int y, int o) static bool_ dright(byte c, cptr str, int y, int o) { - int x = 39 - (strlen(str) / 2) + o; - int i = 1; - while (i <= strlen(str)) + int n = strlen(str); // Conversion to int to avoid warnings + int x = 39 - (n / 2) + o; + for (int i = 1; i <= n; i++) { int a = 79; int time = 0; @@ -402,8 +402,6 @@ static bool_ dright(byte c, cptr str, int y, int o) } } } - - i = i + 1; } return FALSE; } |