I grepped the source code.
In wallet.cpp is outputs that if the amount is less than zero.
In rpc.cpp sure enough it checks for 21 million, which we didn't catch because it should have been using a defined constant there not a number hardcoded at that very spot.
int64 AmountFromValue(const Value& value)
{
    double dAmount = value.get_real();
    if (dAmount <= 0.0 || dAmount > 21000000.0)
        throw JSONRPCError(-3, "Invalid amount");
    int64 nAmount = roundint64(dAmount * COIN);
    if (!MoneyRange(nAmount))
        throw JSONRPCError(-3, "Invalid amount");
    return nAmount;
}
So, Unthinkingbit, gimme a name to name the constant and a value to assign to it. Maybe even guidance as to where such a constant ought to be defined.
Maybe that function MoneyRange needs to be looked at too...
main.h:inline bool MoneyRange(int64 nValue) { return (nValue >= 0 && nValue <= MAX_MONEY); }
Nope it uses a constant we presumably already defined. Maybe we need to use the same constant or a multiple or division of it in AmountFromValue.
(Maybe all *coin code should so each alt doesn't run into same problem if it happens to have more coins than bitcoin as its max.)
-MarkM-