Skip to content

Commit

Permalink
Fixed: ini file quoted paths, RPROG_OHM parameter error
Browse files Browse the repository at this point in the history
  • Loading branch information
oleg-it-com committed Aug 1, 2013
1 parent cce5172 commit 5429300
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
3 changes: 2 additions & 1 deletion bsp/bsp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ if(PLATFORM STREQUAL "N1100")
endif()
if(NOT RPROG_OHM)
MESSAGE(STATUS "No RPROG_OHM specified, using default: 2000")
add_definitions(-DRPROG_OHM=2000)
set (RPROG_OHM 2000)
endif()
add_definitions(-DRPROG_OHM=${RPROG_OHM})
elseif(PLATFORM STREQUAL "F4DISCOVERY")
add_definitions(-DF4DISCOVERY)
set (USE_HOST_MODE 1)
Expand Down
11 changes: 4 additions & 7 deletions src/player/player.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ void Player_Init(void)

Navigator_InitRoot(&PlayerContext, suffixes_white_list);

#ifndef PROFILING
char buf[256];

//todo len???, null-terminated???
int len;
len = ini_gets("file", "path", "", buf, sizeof(buf), PLAYER_INI_FILE);
if (len)
Expand Down Expand Up @@ -140,7 +138,6 @@ void Player_Init(void)
}
}
else
#endif
{
Navigator_NextFile(&PlayerContext);

Expand Down Expand Up @@ -465,13 +462,13 @@ void Player_SaveState(void)
{
f_puts("[file]\n", &f);

f_printf(&f, "path=");
f_printf(&f, "path=\"");
f_puts(PlayerContext.dir_path, &f);
f_printf(&f, "\n");
f_printf(&f, "\"\n");

f_printf(&f, "name=");
f_printf(&f, "name=\"");
f_puts(PlayerContext.fname, &f);
f_printf(&f, "\n");
f_printf(&f, "\"\n");

f_printf(&f, "mstime=%u\n", PlayerState.metadata.mstime_curr);
}
Expand Down

0 comments on commit 5429300

Please sign in to comment.