diff options
author | starkos <none@none> | 2009-08-27 20:13:51 +0400 |
---|---|---|
committer | starkos <none@none> | 2009-08-27 20:13:51 +0400 |
commit | 55150b1be04306abbc873b07d75b845c310b871d (patch) | |
tree | 7b2451d7d3bb3ba1e598096db86086cd72369b8b /src/base/io.lua | |
parent | 31425ba49c6ffb93d31ac9a1a616e9681ba9660b (diff) |
Added indent parameter to printf()
Diffstat (limited to 'src/base/io.lua')
-rw-r--r-- | src/base/io.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/base/io.lua b/src/base/io.lua index 1579a7e..805e87c 100644 --- a/src/base/io.lua +++ b/src/base/io.lua @@ -57,7 +57,13 @@ io.eol = "\n" end - local s = string.format(msg, unpack(arg)) + local s + if type(msg) == "number" then + s = string.rep("\t", msg) .. string.format(unpack(arg)) + else + s = string.format(msg, unpack(arg)) + end + if io.captured then io.captured = io.captured .. s .. io.eol else |