C sscanf无法与char指针一起正常使用

I'm trying to parse a FEN using sscanf in C. I have the following code:

int main() {
  char side, pos[128], castle[4], enpas[2];
  int halfMove, fullMove;
  const char fen[] = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";
  const int res = sscanf(fen, "%s %c %s %s %d %d", pos, &side, castle, enpas, &halfMove, &fullMove);
  printf("%d\n", res);
  printf("%s %c %s %s %d %d\n", pos, side, castle, enpas, halfMove, fullMove);
  return 0;


rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

However when I change the FEN string from a char array to a char pointer like so

const char *fen = "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1";


 w KQkq - 0 1

就像字符串的第一部分被忽略一样。为什么会这样呢?我正在使用GCC 10.1.0。