Merge pull request #51 from atlaua/master

todo resolved
This commit is contained in:
Simon Robertshaw 2011-11-12 04:50:25 -08:00
commit 9b4e3b9436
2 changed files with 11 additions and 3 deletions

View File

@ -3408,12 +3408,16 @@ int search_ui(pixel *vid_buf)
thumb_cache_add(img_id[i], thumb, thlen);
for (pos=0; pos<GRID_X*GRID_Y; pos++) {
if (search_dates[pos]) {
char *id_d_temp = malloc(strlen(search_ids[pos])+strlen(search_dates[pos])+1);
char *id_d_temp = malloc(strlen(search_ids[pos])+strlen(search_dates[pos])+2);
if (id_d_temp == 0)
{
break;
}
strcpy(id_d_temp, search_ids[pos]);
strappend(id_d_temp, "_");
strappend(id_d_temp, search_dates[pos]);
//img_id[i] = mystrdup(id_d_temp);
if (id_d_temp && !strcmp(id_d_temp, img_id[i])) {
if (!strcmp(id_d_temp, img_id[i])) {
break;
}
} else {

View File

@ -3546,7 +3546,11 @@ int main(int argc, char *argv[])
if (sdl_mod&(KMOD_CAPS))
strappend(uitext, " [CAP LOCKS]");
if (GRID_MODE)
sprintf(uitext, "%s [GRID: %d]", uitext, GRID_MODE); //TODO: Undefined behavior: variable is used as parameter and destination in sprintf().
{
char gridtext[15];
sprintf(gridtext, " [GRID: %d]", GRID_MODE);
strappend(uitext, gridtext);
}
#ifdef INTERNAL
if (vs)
strappend(uitext, " [FRAME CAPTURE]");