fixed execution order bug that was causing the first two frame numbers to output...
[puredata.git] / packages / patches / makeversion_tweak-0.41.0-test10.patch
blob7868269b1a53c73fe519ba778e5cee866b3f7b01
1 Index: s_main.c
2 ===================================================================
3 RCS file: /cvsroot/pure-data/pd/src/s_main.c,v
4 retrieving revision 1.28.6.6
5 diff -u -r1.28.6.6 s_main.c
6 --- s_main.c 6 Jan 2008 04:19:15 -0000 1.28.6.6
7 +++ s_main.c 6 Jan 2008 04:29:01 -0000
8 @@ -249,10 +249,11 @@
9 static void pd_makeversion(void)
11 char foo[100];
12 - sprintf(foo, "Pd version %d.%d-%d%s\n",PD_MAJOR_VERSION,
13 - PD_MINOR_VERSION,PD_BUGFIX_VERSION,PD_TEST_VERSION);
14 - pd_version = malloc(strlen(foo)+1);
15 - strcpy(pd_version, foo);
17 + snprintf(foo, sizeof(foo), "Pd version %d.%d-%d%s\n", PD_MAJOR_VERSION,
18 + PD_MINOR_VERSION, PD_BUGFIX_VERSION, PD_TEST_VERSION);
20 + pd_version = strdup(foo);
23 /* this is called from main() in s_entry.c */