Am 23.06.2013 17:55, schrieb Jan Kandziora:
> Hi,
>
> while playing with Pascal Baerten's BAE0911, I found owtcl is treating
> all results from OW_get as C strings, which makes reading data with
> embedded \0 chars impossible.
>
> I made I minimal patch which uses the length information of OW_get
> instead. Works for me. Comments?
>
>
> cvs diff -u module/owtcl/ow.c
> Index: module/owtcl/ow.c
> ===================================================================
> RCS file: /cvsroot/owfs/owfs/module/owtcl/ow.c,v
> retrieving revision 1.5
> diff -u -r1.5 ow.c
> --- module/owtcl/ow.c 23 Sep 2010 03:17:16 -0000 1.5
> +++ module/owtcl/ow.c 23 Jun 2013 15:41:39 -0000
> @@ -368,7 +368,7 @@
> resultPtr = Tcl_NewStringObj(buf, -1);
> }
> } else {
> - resultPtr = Tcl_NewStringObj(buf, -1);
> + resultPtr = Tcl_NewStringObj(buf, s);
> }
> Tcl_SetObjResult(interp, resultPtr);
> free(buf);
>
> Kind regards
>
> Jan
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Windows:
>
> Build for Windows Store.
>
> http://p.sf.net/sfu/windows-dev2dev
> _______________________________________________
> Owfs-developers mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/owfs-developers
>
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
Owfs-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/owfs-developers