Update common_arm64.h

This commit is contained in:
Martin Kroeker 2024-04-16 21:34:19 +02:00 committed by GitHub
parent 34fd14036c
commit e32a9f2931
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -63,7 +63,8 @@ static __inline int WhereAmI(void){
:"=r" (ret) :"=r" (ret)
:: "memory" :: "memory"
); );
if (ret > MAX_CPU_NUMBER) ret = MAX_CPU_NUMBER; ret +=1;
if ((int)ret <0) ret = 0;
return (int)ret; return (int)ret;
} }