GrangerHub / GrangerHub/multiprotocol-slackers

Donate bug

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
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)

![image](https://cloud.githubusercontent.com/assets/7323455/20253834/e96506da-a9fc-11e6-9944-e7b1390b94b9.png)

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.