Skip to content

Commit

Permalink
Fixed behaviour when value is not finite.
Browse files Browse the repository at this point in the history
  • Loading branch information
matszpk committed Aug 8, 2016
1 parent a3e1136 commit 48c2e24
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion amdcovc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ extern "C" {
#endif
#include "../include/adl_sdk.h"

#define AMDCOVC_VERSION "0.2"
#define AMDCOVC_VERSION "0.2.1"

// Memory allocation function
void* __stdcall ADL_Main_Memory_Alloc (int iSize)
Expand Down Expand Up @@ -943,6 +943,11 @@ static bool parseOVCParameter(const char* string, OVCParameter& param)
std::cerr << "Can't parse value in '" << string << "'!" << std::endl;
return false;
}
if (isinf(param.value) || isnan(param.value))
{
std::cerr << "Value of '" << string << "' is not finite!" << std::endl;
return false;
}
afterName = next;
}
if (*afterName!=0)
Expand Down

0 comments on commit 48c2e24

Please sign in to comment.