Commit fc351291 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Fix *LoadModeFile not reporting errors when parsing EDID files. Fix another...

Fix *LoadModeFile not reporting errors when parsing EDID files. Fix another "RMA allocation failed" bug with audio format processing.

Detail:
  c/ScrModes - Fix loadedid() not returning errors from parseedid()
  c/ScrModes - Fix bad use of realloc() in add_audio_format() - if audio_format_count hits zero then it's expected for realloc to return NULL.
Admin:
  Tested on iMx6


Version 0.52. Tagged as 'ScrModes-0_52'
/* (0.51)
/* (0.52)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.51
#define Module_MajorVersion_CMHG 0.52
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 06 Jan 2016
#define Module_Date_CMHG 08 Jan 2016
#define Module_MajorVersion "0.51"
#define Module_Version 51
#define Module_MajorVersion "0.52"
#define Module_Version 52
#define Module_MinorVersion ""
#define Module_Date "06 Jan 2016"
#define Module_Date "08 Jan 2016"
#define Module_ApplicationDate "06-Jan-16"
#define Module_ApplicationDate "08-Jan-16"
#define Module_ComponentName "ScrModes"
#define Module_ComponentPath "castle/RiscOS/Sources/Video/UserI/ScrModes"
#define Module_FullVersion "0.51"
#define Module_HelpVersion "0.51 (06 Jan 2016)"
#define Module_LibraryVersionInfo "0:51"
#define Module_FullVersion "0.52"
#define Module_HelpVersion "0.52 (08 Jan 2016)"
#define Module_LibraryVersionInfo "0:52"
......@@ -2655,7 +2655,7 @@ static _kernel_oserror *add_audio_format(uint8_t byte1, uint8_t byte2, uint8_t b
new_monitor->audio_format_count--;
memmove(candidate, candidate+1, sizeof(AudioFormat)*(new_monitor->audio_format_count-i));
void *new = realloc(new_monitor->audio_formats, new_monitor->audio_format_count*sizeof(AudioFormat));
if (new)
if (new || !new_monitor->audio_format_count)
{
new_monitor->audio_formats = (AudioFormat*) new;
}
......@@ -3434,7 +3434,7 @@ static _kernel_oserror *loadedid (const char *file)
res = Check_EDID_Checksum((char *)edidblock, EDID_Check_AllBlocks);
}
if (!res) {
parseedid(edidblock,NULL);
res = parseedid(edidblock,NULL);
}
free(edidblock);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment