Format.cpp.patch

Abdelghani Omari, 03/08/2018 11:49 AM

Download (581 Bytes)

View differences:

Format.cpp (working copy)
84 84

  
85 85
String FormatIntAlpha(int i, bool upper)
86 86
{
87
	const char *itoc = upper ? "ZABCDEFGHIJKLMNOPQRSTUVWXYZ" : "zabcdefghijklmnopqrstuvwxyz";
87 88
	if(IsNull(i) || i == 0)
88 89
		return Null;
89 90
	String out;
......
93 94
		i = -i;
94 95
	}
95 96
	char temp[10], *p = temp;
96
	i--;
97
	char start = (upper ? 'A' : 'a');
98 97
	do
99
		*p++ = start + (i % 26);
98
		*p++ = itoc[i--%26];
100 99
	while(i /= 26);
101 100
	while(p > temp)
102 101
		out << *--p;