/*
Stockfish, a UCI chess playing engine derived from Glaurung 2.1
Copyright (C) 2004-2008 Tord Romstad (Glaurung author)
- Copyright (C) 2008-2009 Marco Costalba
+ Copyright (C) 2008-2010 Marco Costalba, Joona Kiiski, Tord Romstad
Stockfish is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
nIds = CPUInfo[0];
memset(CPUString, 0, sizeof(CPUString));
- *((int*)(CPUString+0)) = CPUInfo[1];
- *((int*)(CPUString+4)) = CPUInfo[3];
- *((int*)(CPUString+8)) = CPUInfo[2];
+ memcpy(&CPUString[0], &CPUInfo[1], sizeof(int));
+ memcpy(&CPUString[4], &CPUInfo[3], sizeof(int));
+ memcpy(&CPUString[8], &CPUInfo[2], sizeof(int));
// Not an Intel CPU or CPUID.4 not supported
if (strcmp(CPUString, "GenuineIntel") || nIds < 4)