Changed deliberate segfault into an assert+return so segfault won't occur

in release code.


svn path=/trunk/boinc/; revision=15432
This commit is contained in:
David Anderson 2008-06-19 01:13:51 +00:00
parent 8611ca27aa
commit 98875fe047
1 changed files with 4 additions and 2 deletions

View File

@ -126,8 +126,10 @@ void REDUCED_ARRAY_GEN::add_source_row(float* in) {
int i, ry; int i, ry;
if (scury >= sdimy) { if (scury >= sdimy) {
printf("too many calls to add_source_row()!\n"); // printf("too many calls to add_source_row()!\n");
*(int*)0 = 0; // Crashing is not an appropriate response in release code.
assert(scury<sdimy);
return;
} }
if (rdimy == sdimy) { if (rdimy == sdimy) {
ry = scury; ry = scury;