forked from len0rd/rockbox
Bugfix - buf_size was being used before being initialised.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24363 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
428064016b
commit
c5491758dd
1 changed files with 5 additions and 5 deletions
|
@ -170,17 +170,17 @@ enum plugin_status plugin_start(const void* parameter)
|
||||||
return PLUGIN_ERROR;
|
return PLUGIN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (length > buf_size) {
|
|
||||||
rb->splash(HZ*2, "File too big");
|
|
||||||
return PLUGIN_ERROR;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Get the audio buffer */
|
/* Get the audio buffer */
|
||||||
buf = rb->plugin_get_audio_buffer((size_t *)&buf_size);
|
buf = rb->plugin_get_audio_buffer((size_t *)&buf_size);
|
||||||
|
|
||||||
/* Use uncached alias for buf - equivalent to buf |= 0x40000000 */
|
/* Use uncached alias for buf - equivalent to buf |= 0x40000000 */
|
||||||
buf += 0x10000000;
|
buf += 0x10000000;
|
||||||
|
|
||||||
|
if (length > buf_size) {
|
||||||
|
rb->splash(HZ*2, "File too big");
|
||||||
|
return PLUGIN_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
n = rb->read(fd, buf, length);
|
n = rb->read(fd, buf, length);
|
||||||
if (n < length) {
|
if (n < length) {
|
||||||
rb->splash(HZ*2, "Cannot read file");
|
rb->splash(HZ*2, "Cannot read file");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue