|
|
@ -340,15 +340,17 @@ static char *FormatTinyDate(char *buff, Date date, const char* last)
|
|
|
|
return FormatString(buff, GetStringPtr(STR_DATE_TINY), args, 0, last);
|
|
|
|
return FormatString(buff, GetStringPtr(STR_DATE_TINY), args, 0, last);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, int64 number, bool compact, const char* last)
|
|
|
|
static char *FormatGenericCurrency(char *buff, const CurrencySpec *spec, Money number, bool compact, const char* last)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const char* multiplier = "";
|
|
|
|
const char* multiplier = "";
|
|
|
|
char buf[40];
|
|
|
|
char buf[40];
|
|
|
|
char* p;
|
|
|
|
char* p;
|
|
|
|
int j;
|
|
|
|
int j;
|
|
|
|
|
|
|
|
|
|
|
|
/* multiply by exchange rate */
|
|
|
|
/* Multiply by exchange rate, but do it safely. */
|
|
|
|
number *= spec->rate;
|
|
|
|
CommandCost cs(number);
|
|
|
|
|
|
|
|
cs.MultiplyCost(spec->rate);
|
|
|
|
|
|
|
|
number = cs.GetCost();
|
|
|
|
|
|
|
|
|
|
|
|
/* convert from negative */
|
|
|
|
/* convert from negative */
|
|
|
|
if (number < 0) {
|
|
|
|
if (number < 0) {
|
|
|
|