Does it check to see if it could add another input in order to avoid throwing money away in a fee, or does it just look for the first input that fits, and it's just too bad if it's less than 0.01 more than the amount of the transaction?
The latest version of bitcoin does
try to avoid "sub-cent change" by adding more inputs.
If it can't avoid it (e.g. you have 32.29 in your wallet and you send 32.28999999), then the sub-cent change becomes a sub-cent transaction fee. It isn't lost, the miner that includes the transaction will get it.