GrangerHub / GrangerHub/multiprotocol-slackers
Donate bug
- Dominant language
- C
- Stars
- 1
- Forks
- 1
- PR merge metrics
- No merged PRs in 30d
Description
# Donate bug
Reported by _enneract_ on [GrangerHub forums](http://forum.grangerhub.com/t/donate-bug-on-grangerpub/2924)

Notice that the donated amount is a negative number.
The following patch was not generated against the GrangerHub code but provided by enneract against some other repo.
```diff
--- g_cmds.c 2016-02-13 21:16:09.000000000 +0100
+++ g_cmds.c.new 2016-11-07 22:48:10.201411292 +0100
@@ -4959,7 +4959,8 @@
if( level.clients[ i ].pers.connected == CON_CONNECTED &&
ent->client != level.clients + i &&
level.clients[ i ].pers.teamSelection ==
- ent->client->pers.teamSelection ) {
+ ent->client->pers.teamSelection &&
+ level.clients[ i ].pers.credit < max ) {
new_credits = level.clients[ i ].pers.credit + portion;
amounts[ i ] = portion;
totals[ i ] += portion;
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start in g_cmds.c around the donation logic near the reported line 4959 and compare it with the provided patch, noting that the patch came from another repository. Confirm the change prevents donated amounts from becoming negative, then verify the displayed donation values in the affected game flow.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100