summaryrefslogtreecommitdiff
path: root/wk2/sect2/alpha.c
diff options
context:
space:
mode:
Diffstat (limited to 'wk2/sect2/alpha.c')
-rw-r--r--wk2/sect2/alpha.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wk2/sect2/alpha.c b/wk2/sect2/alpha.c
index 33bbfd7..054950f 100644
--- a/wk2/sect2/alpha.c
+++ b/wk2/sect2/alpha.c
@@ -7,7 +7,7 @@ int main(void)
{
string word = get_string("Word: ");
int l = strlen(word);
- for (int i = 0; i < l; i++)
+ for (int i = 0; i < l - 1; i++)
{
// If NOT alphabetical
if (word[i] > word[i + 1])