I think you did make the right decision.
What the one poster said about the vitamin C was spot on as well...guinea pigs need quite a bit of it. Fresh fruits and vegetables are usually eaten with gusto, and pellets offered should be the type made for guinea pigs and not rabbits for this reason. Just thought I would add to that, even though we have no idea what this particular pig's problem was. A lot of people don't know about the vitamin C thing.
Sure wish you did know, because it would make for informative reading. Hope you can help out another little guy soon!