sgs_AbsIndex [function]

sgs_StkIdx sgs_AbsIndex( sgs_Context* C, sgs_StkIdx item )

Attempt to convert a negative stack index into a positive one.

This function can still return negative values - make sure that valid values are passed to it or check if the returned value is in the range [ 0; stack_frame_size ).