~dax/drpc

a594575fe9d31072f092984bd2ef1c695544712b — dax 1 year, 29 days ago 1f210d8
fix value calculation
1 files changed, 1 insertions(+), 1 deletions(-)

M drpc.c
M drpc.c => drpc.c +1 -1
@@ 87,7 87,7 @@ main(int argc, char **argv)
		if (reverse) {
			type = 5 - i - 1;
		}
		value[type] = (int)(value[type] * (100/rate));
		value[type] = (int)(value[type] * (rate/100));
		donate[type] = MIN((int)(cap / value[type]), pieces[type]);
		cap -= value[type] * donate[type];
	}