From: Antoine Fontaine Date: Mon, 3 Jan 2022 16:41:01 +0000 (+0100) Subject: Reproducible builds: omit build date and q3map version from bsp files X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1d1d8164b73a7808fddd6f5d54275434e68d13f4;p=xonotic%2Fnetradiant.git Reproducible builds: omit build date and q3map version from bsp files --- diff --git a/tools/quake3/q3map2/bspfile_ibsp.c b/tools/quake3/q3map2/bspfile_ibsp.c index 1c4c994a..da3be7b6 100644 --- a/tools/quake3/q3map2/bspfile_ibsp.c +++ b/tools/quake3/q3map2/bspfile_ibsp.c @@ -526,7 +526,6 @@ void WriteIBSPFile( const char *filename ){ ibspHeader_t outheader, *header; FILE *file; time_t t; - char marker[ 1024 ]; int size; @@ -545,11 +544,8 @@ void WriteIBSPFile( const char *filename ){ SafeWrite( file, (bspHeader_t*) header, sizeof( *header ) ); /* overwritten later */ /* add marker lump */ - time( &t ); - - /* asctime adds an implicit trailing \n */ - sprintf( marker, "I LOVE MY Q3MAP2 %s on %s", Q3MAP_VERSION, asctime( localtime( &t ) ) ); - AddLump( file, (bspHeader_t*) header, 0, marker, strlen( marker ) + 1 ); + const char marker[] = "I LOVE MY Q3MAP2"; + AddLump( file, header, 0, marker, strlen( marker ) + 1 ); /* add lumps */ AddLump( file, (bspHeader_t*) header, LUMP_SHADERS, bspShaders, numBSPShaders * sizeof( bspShader_t ) ); diff --git a/tools/quake3/q3map2/bspfile_rbsp.c b/tools/quake3/q3map2/bspfile_rbsp.c index 88ebcbf4..598cf2de 100644 --- a/tools/quake3/q3map2/bspfile_rbsp.c +++ b/tools/quake3/q3map2/bspfile_rbsp.c @@ -284,7 +284,6 @@ void WriteRBSPFile( const char *filename ){ rbspHeader_t outheader, *header; FILE *file; time_t t; - char marker[ 1024 ]; int size; @@ -303,9 +302,8 @@ void WriteRBSPFile( const char *filename ){ SafeWrite( file, (bspHeader_t*) header, sizeof( *header ) ); /* overwritten later */ /* add marker lump */ - time( &t ); - sprintf( marker, "I LOVE MY Q3MAP2 %s on %s)", Q3MAP_VERSION, asctime( localtime( &t ) ) ); - AddLump( file, (bspHeader_t*) header, 0, marker, strlen( marker ) + 1 ); + const char marker[] = "I LOVE MY Q3MAP2"; + AddLump( file, header, 0, marker, strlen( marker ) + 1 ); /* add lumps */ AddLump( file, (bspHeader_t*) header, LUMP_SHADERS, bspShaders, numBSPShaders * sizeof( bspShader_t ) );