Advertisement
Jodyone

q

Oct 30th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.32 KB | None | 0 0
  1. int query_len = end_query_ptr - query_ptr;
  2. char query[ query_len + 1];
  3. // if query pointer has something in it string copy
  4. if (query_ptr != NULL )
  5. {
  6.     strncpy(query,query_ptr,query_len);
  7. }
  8. // else set query array to one byte
  9. else
  10. {
  11.     query[0] = '\0'; <---------------- any hints on how to be thinking here ?
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement