Use strtod() instead of strof() to aid VS2005

This commit is contained in:
Yamagi Burmeister 2016-12-18 10:19:35 +01:00
parent 77536e07d8
commit 3f66dec8c8
1 changed files with 2 additions and 2 deletions

View File

@ -422,10 +422,10 @@ ED_ParseField(const char *key, const char *value, edict_t *ent)
*(int *)(b + f->ofs) = (int)strtol(value, (char **)NULL, 10); *(int *)(b + f->ofs) = (int)strtol(value, (char **)NULL, 10);
break; break;
case F_FLOAT: case F_FLOAT:
*(float *)(b + f->ofs) = strtof(value, (char **)NULL); *(float *)(b + f->ofs) = (float)strtod(value, (char **)NULL);
break; break;
case F_ANGLEHACK: case F_ANGLEHACK:
v = strtof(value, (char **)NULL); v = (float)strtod(value, (char **)NULL);
((float *)(b + f->ofs))[0] = 0; ((float *)(b + f->ofs))[0] = 0;
((float *)(b + f->ofs))[1] = v; ((float *)(b + f->ofs))[1] = v;
((float *)(b + f->ofs))[2] = 0; ((float *)(b + f->ofs))[2] = 0;