IRC logs for #openttd.dev on OFTC at 2013-10-03
⏴ go to previous day
01:43:58 *** Supercheese has joined #openttd.dev
03:09:17 *** JGR_ has joined #openttd.dev
07:08:59 *** LordAro has joined #openttd.dev
07:08:59 *** ChanServ sets mode: +v LordAro
09:10:16 *** frosch123 has joined #openttd.dev
09:10:16 *** ChanServ sets mode: +v frosch123
09:33:00 *** Sturmi has joined #openttd.dev
12:18:40 *** Ristovski has joined #openttd.dev
15:55:02 *** Zuu has joined #openttd.dev
16:39:50 <frosch123> isn't just "SKIP_EMPTY(p);" enough?
16:40:05 <frosch123> so the "while" catches he ] ?
16:40:35 <Zuu> The problem is that this->ReadValue will return an error code without my patch.
16:40:47 <frosch123> ah, it skips the first char then
16:40:55 <Zuu> Because ReadValue will start at ']'
16:41:23 <frosch123> weird loop actually
16:41:59 <Zuu> It is possible with fewer lines to at the beginning of the loop do a SKIP_EMPTY(p); and if (p == ']') break;
16:42:20 <Zuu> However, then you do checks thate are only useful in the first loop at every iteration of the loop.
16:43:36 <frosch123> yeah, diff looks fine
16:43:41 <Zuu> One can possible try to re-write the loop to make a prettier solution while hopefully not breaking any feature of the current solution.
16:46:52 <Zuu> But as the loop is not that straight forward, I fear that I would easily break something.
16:56:13 *** Supercheese has joined #openttd.dev
17:36:29 <Zuu> Hmm ScriptEventAdminPort::ReadString do not bail out on \" in a string, but it doesn't remove the \ in the string pushed into Squirrel.
17:40:38 <Zuu> I guess one could allocate a buffer and make a copy just before sq_pushstring. On this buffer we could run find-and-replace \" => " and then use the buffer as input to sq_pushstring
17:49:58 *** Alberth has joined #openttd.dev
17:49:58 *** ChanServ sets mode: +v Alberth
19:24:21 *** andythenorth has joined #openttd.dev
19:24:21 *** ChanServ sets mode: +v andythenorth
19:24:22 *** andythenorth has left #openttd.dev
21:10:55 *** Alberth has left #openttd.dev
continue to next day ⏵