mzaks / mojo-csv

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Problem with mojo 0.5 for mojo-csv

andresnowak opened this issue · comments

This is not a problem with mojo-csv, but a bug I have run to trying to make mojo-csv work with mojo version 0.5, it seems that when instantiating a String from a pointer or DTypePointer with a len of let's say 5 (String(self._buffer, self.num_bytes)), instead of creating a String of size 5, it creates one of size 4, I don't know what they changed, but it is a strange bug. I created this issue just to let you know if you encounter the bug, so you can close this issue if you want.

I will have a look

@andresnowak I found the issue. Since 0.5.0 the pointer needs to point to a 0 terminated string.

ohhh, okay. And thank you for your help in clarifying this @mzaks.

@andresnowak thanks for the PR you made, helped me to get started much quicker than I would have without it.

You are welcome, i did want to help updating the program to mojo 0.5, but i was fighting with the problem for a lot of time, until i found that the problem was the string, but i really thought it was a bug, i didn't think it was just a change for the null termination. But well at least the work wasn't for nothing