New code to write 'sub version' string. It was using a (controlled) 1 byte
overflow in a safe area, but that's not very nice code...
This commit is contained in:
@@ -1842,6 +1842,7 @@ static void write_brushes(WriteData *wd, ListBase *idbase)
|
||||
static void write_global(WriteData *wd)
|
||||
{
|
||||
FileGlobal fg;
|
||||
char subvstr[8];
|
||||
|
||||
fg.curscreen= G.curscreen;
|
||||
fg.curscene= G.scene;
|
||||
@@ -1849,8 +1850,10 @@ static void write_global(WriteData *wd)
|
||||
fg.winpos= G.winpos;
|
||||
fg.fileflags= (G.fileflags & ~G_FILE_NO_UI); // prevent to save this, is not good convention, and feature with concerns...
|
||||
fg.globalf= G.f;
|
||||
/* note, this will print byte nr 5, but that's corrected */
|
||||
sprintf(fg.subvstr, "%4d", BLENDER_SUBVERSION);
|
||||
|
||||
sprintf(subvstr, "%4d", BLENDER_SUBVERSION);
|
||||
memcpy(fg.subvstr, subvstr, 4);
|
||||
|
||||
fg.subversion= BLENDER_SUBVERSION;
|
||||
fg.minversion= BLENDER_MINVERSION;
|
||||
fg.minsubversion= BLENDER_MINSUBVERSION;
|
||||
|
||||
Reference in New Issue
Block a user