> Ok I tested it and I got an odd bug. > > When I "writeln" the buffer contents before writing them to the Dest > stream, they are ok. But the resulting file is a garbage of xterm crap > (mostly symbols) with exactly same size as the thing I downloaded > (completly different data). > > I've no idea where to look, since writeln of the buffer looks 100% ok... > > Any idea what this might cause? I can commit it so you can test.
Sound like you are doing something like write (x,< a number>) with x a pointer type instead of write (x[0],< a number >) IOW writing the pointer value and a random number of bytes because you forgot a dereference. _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel