diff options
author | Walter van Niftrik | 2010-01-24 15:21:51 +0000 |
---|---|---|
committer | Walter van Niftrik | 2010-01-24 15:21:51 +0000 |
commit | bffdcc9e54f5228d11b30c6a1f848746b843181d (patch) | |
tree | a191ac911f12889d23fa9ed0a5f72225cb70a031 /engines/sci/engine/kstring.cpp | |
parent | 0d2a75c75d7b0f5330fba59eaf51dd574366b9c6 (diff) | |
download | scummvm-rg350-bffdcc9e54f5228d11b30c6a1f848746b843181d.tar.gz scummvm-rg350-bffdcc9e54f5228d11b30c6a1f848746b843181d.tar.bz2 scummvm-rg350-bffdcc9e54f5228d11b30c6a1f848746b843181d.zip |
SCI: Fix left aligning and centering in kFormat.
svn-id: r47500
Diffstat (limited to 'engines/sci/engine/kstring.cpp')
-rw-r--r-- | engines/sci/engine/kstring.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/engines/sci/engine/kstring.cpp b/engines/sci/engine/kstring.cpp index 42ca0cc374..5e124e84e0 100644 --- a/engines/sci/engine/kstring.cpp +++ b/engines/sci/engine/kstring.cpp @@ -241,15 +241,10 @@ reg_t kFormat(EngineState *s, int argc, reg_t *argv) { if (xfer == '0') fillchar = '0'; - else - - if (xfer == '=') { - align = ALIGN_CENTRE; - source++; - } else - - if (isdigit(xfer)) - source--; /* Stepped over length argument */ + else if (xfer == '=') + align = ALIGN_CENTRE; + else if (isdigit(xfer) || (xfer == '-')) + source--; // Go to start of length argument str_leng = strtol(source, &destp, 10); |