GithubHelp home page GithubHelp logo

Comments (5)

nem0 avatar nem0 commented on June 3, 2024

Hi, I can't reproduce the issue. I see skipLine correctly handling comments in \r\n mode. Do you have an fbx file I can try to reproduce this?

from openfbx.

TomTheFurry avatar TomTheFurry commented on June 3, 2024

I amon the phone atm so can't give a sample right now, but basically, in here:

https://github.com/nem0/OpenFBX/blob/1c1e86380c5cc78180083d9aed30ff115cf55774/src/ofbx.cpp#LL779C5-L779C6

if (cursor->current < cursor->end) ++cursor->current;

While the 'next line' token is detected correctly on the loop before the linked line, which advances the cursor til it hit the 'next line' token, the linked line then, disregard whether it is a '\n' or '\r\n', and instead just advances 1 character. This makes the 'skipLine()' to fail to skip the actual line.

from openfbx.

nem0 avatar nem0 commented on June 3, 2024

what happens in case of ;comment\r\n is:

  1. cursor goes up to \r
  2. isEndLine returns false for \r because it fails on *(cursor.current + 1) != '\n' (emphasis on !=)
  3. cursor moves further to \n
  4. isEndLine returns true now
  5. cursor is move further by one character if (cursor->current < cursor->end) ++cursor->current; so the whole line is correctly skipped

I must be misunderstanding something.

from openfbx.

TomTheFurry avatar TomTheFurry commented on June 3, 2024

Oh. That's my mistake then. Apologies for wasting your time here. I did not notice that is a 'not equal' sign instead of a 'equal' sign.

from openfbx.

nem0 avatar nem0 commented on June 3, 2024

No problem.

from openfbx.

Related Issues (20)

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.