printf's * doesn't like negative numbers
|Reported by:||elaforge||Owned by:|
|Type of failure:||None/Unknown||Test Case:||libraries/base/tests/T7457|
|Related Tickets:||Differential Rev(s):|
Text.Printf.printf has a bug where it doesn't like negative numbers for * modifiers:
Prelude Text.Printf> printf "%*sx\n" (-3) "hi" hix
In the C printf, this would be
From looking at the source, it's a pretty easy bug to fix. Patch attached. I also included a patch to turn the mixed tabs and spaces into just spaces since I hate that stuff.