mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Fixed a casting error
This commit is contained in:
parent
84196b1ef3
commit
968762b144
|
@ -652,7 +652,7 @@ void CSqlScore::agoTimeToString(int agoTime, char agoString[]){
|
|||
seconds = times[i];
|
||||
strcpy(name,names[i]);
|
||||
|
||||
count = floor(agoTime/seconds);
|
||||
count = floor((float)agoTime/(float)seconds);
|
||||
if(count != 0){
|
||||
break;
|
||||
}
|
||||
|
@ -672,7 +672,7 @@ void CSqlScore::agoTimeToString(int agoTime, char agoString[]){
|
|||
strcpy(name2,names[i+1]);
|
||||
|
||||
// add second piece if it's greater than 0
|
||||
int count2 = floor((agoTime - (seconds * count)) / seconds2);
|
||||
int count2 = floor((float)(agoTime - (seconds * count)) / (float)seconds2);
|
||||
|
||||
if (count2 != 0) {
|
||||
if(count2 == 1){
|
||||
|
|
Loading…
Reference in a new issue