winebuild: Avoid calling asm_name twice in function arguments.

It returns a static buffer pointer and will free the first returned
pointer on the second call.
This commit is contained in:
Rémi Bernon 2022-11-04 19:47:35 +01:00 committed by Alexandre Julliard
parent 53c4f638ef
commit 9d1175a464

View file

@ -1021,8 +1021,11 @@ const char *asm_globl( const char *func )
break;
case PLATFORM_MINGW:
case PLATFORM_WINDOWS:
buffer = strmake( "\t.globl %s\n%s:", asm_name( func ), asm_name( func ) );
{
const char *name = asm_name( func );
buffer = strmake( "\t.globl %s\n%s:", name, name );
break;
}
default:
buffer = strmake( "\t.globl %s\n\t.hidden %s\n%s:", func, func, func );
break;