Donate Share

calc: C-style arbitrary precision system

Tracker: Bugs

5 Potential fixes for list bug - ID: 1851454
Last Update: Comment added ( lcn2 )

In opcodes.c:

S_FUNC void
o_printresult(void)
{
VALUE *vp;

vp = stack;
if (vp->v_type == V_ADDR)
vp = vp->v_addr;
if (vp == NULL) return; /* <<<<<< fix here */
if (vp->v_type != V_NULL) {
if (conf->tab_ok)
math_chr('\t');
printvalue(vp, PRINT_UNAMBIG);
math_chr('\n');
math_flush();
}
freevalue(stack--);
}


In value.c:

void
copyvalue(VALUE *oldvp, VALUE *newvp)
{
if (oldvp == NULL) return; * <<<<<< fix here */
newvp->v_type = oldvp->v_type;
if (oldvp->v_type >= 0) {
switch (oldvp->v_type) {


Now the following, instead of crashing:

rpnstack = list()

followed by:

rpnstack[0]

returns:

Index out of bounds for list
Misaligned stack


which is reasonable, although not necessarily
the way it should be fixed, I don't really
know the code well enough.

Ken Crossen "kcrossen atsign gmail period com"


Nobody/Anonymous ( nobody ) - 2007-12-15 18:20

5

Closed

Duplicate

(chongo) Landon Curt Noll

None

None

Public


Comment ( 1 )




Date: 2008-05-10 13:54
Sender: lcn2SourceForge.net DonorProject Admin


This is a duplicate bug report of #1851466


Log in to comment.

Attached File

No Files Currently Attached

Changes ( 4 )

Field Old Value Date By
status_id Open 2008-05-10 13:54 lcn2
resolution_id None 2008-05-10 13:54 lcn2
close_date - 2008-05-10 13:54 lcn2
assigned_to nobody 2008-05-10 13:23 lcn2