… | |
… | |
246 | |
246 | |
247 | for (int i = 0; i < skillvec.size (); ++i) |
247 | for (int i = 0; i < skillvec.size (); ++i) |
248 | sl.printf ("%d:%s\n", CS_STAT_SKILLINFO + i, &skillvec [i]->name); |
248 | sl.printf ("%d:%s\n", CS_STAT_SKILLINFO + i, &skillvec [i]->name); |
249 | |
249 | |
250 | if (sl.length () > MAXSOCKBUF) |
250 | if (sl.length () > MAXSOCKBUF) |
251 | { |
|
|
252 | LOG (llevError, "Buffer overflow in send_skill_info!\n"); |
251 | cleanup ("buffer overflow in send_skill_info!"); |
253 | fatal (0); |
|
|
254 | } |
|
|
255 | |
252 | |
256 | ns->send_packet (sl); |
253 | ns->send_packet (sl); |
257 | } |
254 | } |
258 | |
255 | |
259 | /** |
256 | /** |
… | |
… | |
269 | |
266 | |
270 | for (int i = 0; i < NRSPELLPATHS; i++) |
267 | for (int i = 0; i < NRSPELLPATHS; i++) |
271 | sl.printf ("%d:%s\n", 1 << i, spellpathnames[i]); |
268 | sl.printf ("%d:%s\n", 1 << i, spellpathnames[i]); |
272 | |
269 | |
273 | if (sl.length () > MAXSOCKBUF) |
270 | if (sl.length () > MAXSOCKBUF) |
274 | { |
|
|
275 | LOG (llevError, "Buffer overflow in send_spell_paths!\n"); |
271 | cleanup ("buffer overflow in send_spell_paths!"); |
276 | fatal (0); |
|
|
277 | } |
|
|
278 | |
272 | |
279 | ns->send_packet (sl); |
273 | ns->send_packet (sl); |
280 | } |
274 | } |
281 | |
275 | |
282 | /** |
276 | /** |
… | |
… | |
1349 | } |
1343 | } |
1350 | else |
1344 | else |
1351 | append_spell (pl, sl, spell); |
1345 | append_spell (pl, sl, spell); |
1352 | |
1346 | |
1353 | if (sl.length () > MAXSOCKBUF) |
1347 | if (sl.length () > MAXSOCKBUF) |
1354 | { |
|
|
1355 | LOG (llevError, "Buffer overflow in esrv_add_spells!\n"); |
1348 | cleanup ("buffer overflow in esrv_add_spells!"); |
1356 | fatal (0); |
|
|
1357 | } |
|
|
1358 | |
1349 | |
1359 | /* finally, we can send the packet */ |
1350 | /* finally, we can send the packet */ |
1360 | pl->ns->flush_fx (); |
1351 | pl->ns->flush_fx (); |
1361 | pl->ns->send_packet (sl); |
1352 | pl->ns->send_packet (sl); |
1362 | } |
1353 | } |