src/strings.cpp
changeset 10135 21b4050a479b
parent 10114 1ce7c1597f10
child 10197 fa185196aef1
--- a/src/strings.cpp	Sun Sep 14 10:39:22 2008 +0000
+++ b/src/strings.cpp	Sun Sep 14 14:31:37 2008 +0000
@@ -267,6 +267,10 @@
 	return buff;
 }
 
+static char *FormatHexNumber(char *buff, int64 number, const char *last)
+{
+	return buff + snprintf(buff, last - buff, "0x%x", (uint32)number);
+}
 
 static char *FormatYmdString(char *buff, Date date, const char* last)
 {
@@ -815,6 +819,10 @@
 				buff = FormatNoCommaNumber(buff, GetInt64(&argv), last);
 				break;
 
+			case SCC_HEX: // {HEX}
+				buff = FormatHexNumber(buff, GetInt64(&argv), last);
+				break;
+
 			case SCC_CURRENCY: // {CURRENCY}
 				buff = FormatGenericCurrency(buff, _currency, GetInt64(&argv), false, last);
 				break;