aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 5c2c858d..0aaef0b2 100644
--- a/src/library.js
+++ b/src/library.js
@@ -2166,6 +2166,12 @@ LibraryManager.library = {
}
}
+ // Move sign to prefix so we zero-pad after the sign
+ if (argText.charAt(0) == '-') {
+ prefix = '-' + prefix;
+ argText = argText.substr(1);
+ }
+
// Add padding.
while (prefix.length + argText.length < width) {
if (flagLeftAlign) {