Giter VIP home page Giter VIP logo

Comments (3)

skinkie avatar skinkie commented on June 3, 2024

Something like this?

diff --git a/router.c b/router.c
index 0f7909c..702be23 100644
--- a/router.c
+++ b/router.c
@@ -367,7 +367,7 @@ uint32_t router_result_dump(router_t *prouter, router_request_t *preq, char *buf
}
//b += sprintf (b, "round %d ", round);
uint32_t last_stop = states[s].back_stop;

  •        if (s < 0 || s > router.tdata.n_stops) { 
    
  •        if (last_stop == NONE || s == NONE || s > router.tdata.n_stops) { 
             // this was causing segfaults
             b += sprintf (b, "neg stopid %d\n", s);
             break;
    

from rrrr.

abyrd avatar abyrd commented on June 3, 2024

Actually it's redundant since NONE is the max integer. Just do > nstops, which will include and special values on a uint.

-a

Stefan de Konink [email protected] a écrit :

Something like this?

diff --git a/router.c b/router.c
index 0f7909c..702be23 100644
--- a/router.c
+++ b/router.c
@@ -367,7 +367,7 @@ uint32_t router_result_dump(router_t *prouter,
router_request_t *preq, char *buf
}
//b += sprintf (b, "round %d ", round);
uint32_t last_stop = states[s].back_stop;

  •        if (s < 0 || s > router.tdata.n_stops) { 
    
  •        if (last_stop == NONE || s == NONE || s >
    
    router.tdata.n_stops) {
    // this was causing segfaults
    b += sprintf (b, "neg stopid %d\n", s);
    break;

Reply to this email directly or view it on GitHub:
#17 (comment)

Andrew

Sent from a device without a keyboard. Please excuse my brevity and any absurd auto-correct errors.

from rrrr.

abyrd avatar abyrd commented on June 3, 2024

I am adding code to interpret epoch times as date&time, and apply the datemask.

Stefan de Konink [email protected] a écrit :

Something like this?

diff --git a/router.c b/router.c
index 0f7909c..702be23 100644
--- a/router.c
+++ b/router.c
@@ -367,7 +367,7 @@ uint32_t router_result_dump(router_t *prouter,
router_request_t *preq, char *buf
}
//b += sprintf (b, "round %d ", round);
uint32_t last_stop = states[s].back_stop;

  •        if (s < 0 || s > router.tdata.n_stops) { 
    
  •        if (last_stop == NONE || s == NONE || s >
    
    router.tdata.n_stops) {
    // this was causing segfaults
    b += sprintf (b, "neg stopid %d\n", s);
    break;

Reply to this email directly or view it on GitHub:
#17 (comment)

Andrew

Sent from a device without a keyboard. Please excuse my brevity and any absurd auto-correct errors.

from rrrr.

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.