Coder Social home page Coder Social logo

wavetranssdk's Issues

测试非(255,223)数据块不能工作

找了一圈资料,发现这份RS代码最简洁,但在做测试时。
除(255,223,symsize=8, poly=0x11d, fcs=1, prim=1, nroots=32) 这一种组合方式测试通过外,其它的测试都没有通过。

经调试时发现有报 segmentation fault,跟综到 encode_rs_char中,
是由 feedback = INDEX_OF[data[i] ^ parity[0]]; 这行代码引起的。
“data[i] ^ parity[0]”的范围可能是0-255,

define INDEX_OF (rs->index_of)

rs->index_of = (data_t )malloc(sizeof(data_t)(rs->nn+1));

当使用其它数据块时,nn会小于255,所以 INDEX_OF[] 肯定得到的是错误结果。

这块有谁刚好碰到过吗?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.